Search code examples
nginxdyndns

How to make nginx work with dyndns?


I am trying to make a local site work over the web with dyndns. I am using nginx as a server. Here is what I have in my file located in 'sites-available':

server { listen 80 default; server_name mydyndnshost; ...

If I add "mydyndnshost" to listen, nginx will fail to start. If I leave it like this, it will work, but only localy, so if I access "mydyndnshost" in a browser, it won't show my site. What it does show is my router login screen. lol


Solution

  • Sounds like you need to open an inbound tunnel in your router/firewall. The mydyndnshost name is pointing to your public IP, which your router/firewall answers. You'll need to configure a rule like "when receiving hits on port 80, forward them to port 80 of (my server)" or similar.

    Edit: Oh, and turn off the public login ability on your router. That should (normally) be accessible from inside only.