I have a local web server that I want to make available outside of my local network of two computers. I configured NAT at my router, configured the firewall. I Typed the external IP and got nothing, while I still was able to access my web server by typing “localhost”, I tried both IIS and Apache, but what is interesting is that fact that the other people can access my web server via that external IP, I just cannot access it from my local network.
What am I doing wrong?
Your computer (and, therefore, your web server) has three IP addresses: localhost (127.0.0.1), LAN (e.g., 192.168.0.1) and WAN (22.214.171.124). You should be accessing your server via localhost (or the VirtualHost) but, if others can view your VirtualHost site via the WAN IP, then the problem is likely with your firewall. As a test, shut it down then try to access the website (don’t forget to enable it again!).
Thank you for your reply, yes others can view my website via the WAN IP, but I can’t. I disabled my router firewall and disables my Windows Firewall and I still can’t see my website via the WAN IP. I doubt that the firewall causes this because in this case nobody could access it, but they can.
The fact that others can see your website is what led me to believe that it is your firewall that’s prohibiting you from getting out to your WAN IP to access your server - it’s obviously NOT blocking access from the WAN.
Since I deal mostly with my own TEST server, I was thinking that it’s a hosts file problem (do all three IP addresses resolve to your VirtualHost?) but, since you can access from the LAN and WAN, I’m guessing not.
Final thought: If you are attempting to access using the IP Address, you should be getting the default localhost rather than the VirtualHost - check your server configuration file(s).
Okay, I’m not much help this morning … sorry!