Unable to setup HTTP Server so that external clients can access – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.
But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about apache-2.2, http, port, web-services, port-forwarding.
I am running Red Hat Enterprise Server 6. It has Apache Server (
httpd) installed and running on boot by default. My document files are kept in
/var/www/html/web and I can access them on my computer through
http://localhost/web. I have forwarded
443 ports to my server’s local IP address as told in this article, but despite this redirection I cannot access my Web Server over the Internet by typing my router’s global IP on browser’s address bar of other computers with internet connection which are not in my LAN.
I use this website to check for
80th port, and the result is:
Error: I could not see your service on port (80) Reason: Connection timed out
I added (and forwarded)
Listen 413 and
Listen 6666 ports to
/etc/httpd/conf/httpd.conf Apache configuration file to see if my ISP blocks port
80, but with no success.
Though I did the same (port forwarding) to
22th port for SSH, and it worked (and still works) globally.
When you do portforwarding on your border router you don’t need to add listen directives on your apache server.
In order to test if your ISP blocks port 80 you need to do the following:
- Set up portforwarding in your router for another port, eg. port 8080 (or something else) or even port 22, if that is known to work. Forward to port 80 on your apache. It is possible to have several port forwarding definitions on your router all pointing to the same port on your server. You don’t need to change any listen directives on your server.
You have to understand what port fowarding does. It translates incoming requests. The server doesn’t even see what the external IP and portnumer used is.
So if for example your outside IP is 220.127.116.11 and your internal server has address 10.10.10.10 you could make the following port forwards on your router:
port 8080 to 10.10.10.10:80
And then on some machine outside your network start a browser and enter:
Your firewall will forward this to 10.10.10.10:80. So you don’t need to add any “listen 8080” to your server. You can add other port forwards, or even a range (on some routers), to be able to test more port numbers.
You can test this with different ports until you find one that works. There is no law that says that a web server must answer on port 80. In fact I once forwarded an ftp port on a router to an ssh server to get around an ssh block in a corporate firewall…