0

First, I apologize if this isn't the right forum as this is somewhat of a networking question.

To give a brief explanation of what I want to achieve is basically have the services or apps provided by Synology be accessible via a simple URL without port numbers. I have a dedicated IP address, so I don't have to worry about setting up DDNS.

I thought all I would need to do is setup a very small NGINX server that would take in port 80/443 (SSL by Lets Encrypt and primary domain is on Cloudflare. The NAS would be a subdomain).

This is what my NGINX server code looks like:

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    ssl_certificate /etc/letsencrypt/live/nas.mydomain.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/nas.mydomain.com/privkey.pem;

    root /var/www/nas/html;
    index index.html index.htm index.nginx-debian.html;

    server_name nas.mydomain.com;

    location / {
       proxy_set_header Host $http_host;
       proxy_set_header X-Forwarded-Host $host;
       proxy_set_header X-Forwarded-Server $host;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

       proxy_pass          https://EXTERNALIP:5001;
    }
}

However, it fails to respond (testing inside & outside of my network).

Any ideas would be appreciated.

Thanks, AJ

AJ Tatum
  • 101
  • 1
  • What does "fails to respond" mean exactly? What is the output of `curl -v`? – Tero Kilkanen Oct 24 '21 at 07:03
  • ehm, where is the NAS located? in case in the same lan as the web server then use the lan ip. in case its a non static ip, this question is off topic since superuser.com is for enduser – djdomi Oct 24 '21 at 08:44
  • I get a 302 bad gateway error message. @djdomi - I totally forgot about superuser, that's probably the best place for this discussion. Thanks. – AJ Tatum Oct 24 '21 at 14:08
  • @ajtatum please flag your own question for moving – djdomi Oct 24 '21 at 19:38

0 Answers0