Connecting to home nginx server through outside (public ip)

Hi all. A week ago I had Ubuntu with an nginx server running on my virtualbox on my laptop. You could access it through the public ip of our house, everything was great. Then I bought a raspberry pi, and got everything set up the same way on it but with Raspbian, Debian, nginx. The problem is that I can’t access the website outside the home network. I can while on the house wifi. And I can even putty in from outside of the home network (and from inside too). But not the website. I’m forwarding ports 80 and 22 to the raspberry pi which is connected through wifi with a dynamic ip. So the 22 port forwarding is working for ssh, putty. And probably 80 too is working? but the website won’t load from outside of the home network.

That the web page will load from inside says that the server stuff on the raspberry pi is working. And I don’t know how the port forwarding could be messed up for just port 80, pretty straight forward. And I’m going to the right public ip address.

note: i was messing around with setting a static ip for the pi before starting the server and was making the private ip = … that wouldn’t mess up anything right? Not using that now and I changed everything back to the initial settings.

Thank you very much.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I’ve faced similar problems before with self-hosting web stuff. Some internet service providers use port blocking to prevent users from hosting web/email servers (the user still can, however traffic directed at them on port 80 (web)/25 (email) will be dropped). It’s a precautionary measure apparently.

If that could be the case, contact your ISP and ask if they have port blocking/block port 80 from their end and if so, is it possible for it to be disabled?

It might work while you’re on the network and try browsing to the public IP, but that would be the router allowing loopback, the traffic isn’t actually going externally to the ISP then back.