I can access my website internally (local network) but not externally. How do I fix this?

First, I am very new to this, so the solution may be obvious to some, but not to me. I am running two physical rack servers on the same local network, each is running Ubuntu Server 16.04 with LAMP stack installed. I use the first server to test certain ideas, configurations, etc… The second server is running (hosting) multiple websites using Apache2 Virtual Hosts with no access problems. I am hosting a single website on the first server (not using Apache2’s default.conf) and I can access the website from the local network but not from the internet. I am on a residential IP. I have checked the DNS record for the site in question, it points to the proper IP address. My router is set to forward the appropriate port to the server’s address. UFW appears to be configured properly, and the problem persists if I disable UFW. I have tried shutting down the second server, leaving only one server operating on the network, but the problem persists. I’m not sure where to look next. Any help is greatly appreciated.

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.

This question was answered by @ForYourIT:

@mugspics I am not sure if this is the right forum for you, but I could provide you some support.

When something like this happens, you need to determine where the problem could be. I would follow the following actions

  • Ping the domain, see if it goes the proper IP
  • Check the port, see if it is open externally
  • Traceroute the IP, see if it gets blocked somewhere
  • Check logs, can you find helpfull information somewhere?
  • Simplify everything, for example:
    • Disable firewall, or don’t redirect port 5060 (for example) to internal 80 but just open 80
    • Make a simplified index.html
    • Only enable a defaul VHOST, disable the others

Maybe you can find some other actions you haven’t done yet, or give some more information on logs and configurations so we can check those.

View the original comment