The sites work fine on localhost and the local network, but not on the internet.
Most WAMP Servers such as WampDeveloper Pro accept all incoming connections by default.
Even when a request comes in for an unknown website (i.e., the domain name or IP address is not assigned to any website), Apache is configured to return the default website (usually localhost, or the first VirtualHost loaded).
If you are unable to make a connection from the internet to your website, then the request did not reach Apache.
Chrome (browser) displays message:
"This webpage is not available"
And clicking on Details shows:
Error code: ERR_CONNECTION_TIMED_OUT
IE (browser) produces a more generic
"Internet Explorer cannot display the webpage" message, without any specific error code…
The most common causes of this are:
- Local Firewall software such as McAfee, Norton, and Windows Firewall blocking incoming port 80 and 443 requests.
- Bad or missing port-forward rules in the Router.
- Router settings blocking internet traffic via internal firewall or configuration.
- Network firewall or appliances dropping incoming port 80 and 443 requests.
- The ISP blocking incoming port 80 and 443 requests.
- Changing IPs (both the LAN IP and Public IP), and/or bad DNS records for domains.
- Within LAN or Corporate Network, local network proxy settings that are taking the domain-name resolve to somewhere else.
To troubleshoot the issue –
1. Delete all auto-created Windows Firewall rules for “Apache” or “HTTPD”. Create general rules to open port 80 and 443 TCP. Once Apache is started again, when notified/prompted by the firewall, click to unblock Apache.
Also turn all other firewall and anti-virus software off when testing everything… McAfee, Norton, Kaspersky, etc.
2. Access the Router via its LAN URL (usually http://192.168.1.1 or http://192.168.0.1), and go over its setting to make sure it is not blocking internet traffic.
Then remove all port-forwarding rules, and create the proper rules to forward all WAN:80 and WAN:443 traffic (internet requests) to LAN:80 and LAN:443 (the LAN IP of server, usually in the range of 192.168.1.x).
The Public IP will be assigned to the first device connected to the ISP (which is usually the Router), and that is the reason why the Router needs the proper port-forwarding rules – so that it can forward incoming internet traffic requests to the proper LAN system.
3. When testing this, bypass DNS and domain-names by using the Public IP address directly:
A) Assign both the Public IP address and LAN IP address as Domain Aliases of the website.
B) Turn off Redirects from Aliases to Primary Domain Name (so Apache does not redirect the request to another location).
C) And use the Public IP address as URL: http://public.ip.address/, to access your website.
4. Verify that you are using the right Public IP and LAN IP addresses. These IPs can change time-to-time.
5. Also, test the connection from another LAN system via URL: http://lan-ip-address/ and http://computer-name/. If this is not working, there is an issue within the local network.
Being able to successfully ping the Public IP will tell you nothing about the situation… Pings work differently from HTTP connections. If a ping comes back, all that signifies is that the Router settings have pings enabled, and your Router is able to ping you back.
If Apache is running, then it was successful in binding to port 80 and 443, and it’s not a problem with another web-facing service or application (like Skype) taking these ports.