Score:0

Using NGINX to Access Synology services without port numbers?

it flag

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

us flag
What does "fails to respond" mean exactly? What is the output of `curl -v`?
djdomi avatar
za flag
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
it flag
I get a 302 bad gateway error message. @djdomi - I totally forgot about superuser, that's probably the best place for this discussion. Thanks.
djdomi avatar
za flag
@ajtatum please flag your own question for moving
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.