This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
I have an UnRAID machine that is running Nextcloud with ports mapped (host->container) 8181->80 and 4444->443.
To access it remotely I have a domain pointing to a VPS that runs OpenVPN server which the UnRAID machine connects to. The VPS is forwarding public ports 80 and 443 to UnRAID's ports 8181 and 4444 via the OpenVPN tunnel. The http->https redirect is working as intended in this instance.
When accessing Nextcloud via http on it's LAN or OpenVPN IP i get redirected to UnRAID's web interface. The problem is the container's nginx config. It doesn't know that it should redirect traffic from local or VPN IPs to port 4444 instead of 443.
I have changed /nginx/site-confs/default to include a second server directive:
server {
listen 80;
listen [::]:80;
server_name my.domain *.my.domain;
return 301 https://$host:443$request_uri;
}
server {
listen 80;
listen [::]:80;
server_name (LAN.IP) (VPN.IP;
return 301 https://$host:4444$request_uri;
}
server {
listen 443 ssl http2;
...
But his doesn't work. When accessing from LAN or VPN via IP I still get sent to port 443 which is UnRAIDs web interface.
Any tips?
Post Details
- Posted
- 4 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/unRAID/comm...