What I've Tried

I will begin by saying that i've looked across this site at a few questions and answers and have not found a solution. Most of the solutions i've come across, the fix has been to update the "hosts" file with the correct IP / Hostname. E.G: Virtual hosts not working

I'm Following this tutorial: https://httpd.apache.org/docs/2.4/vhosts/examples.html#page-header, scroll down to the "Running Different Sites On Different Ports" Section and thats the code i've been following.

My httpd.conf file is stored here: http://codepad.org/zxI4iC5s

I have ran netstat -tuplen and have retrieved a list of all the ports that are being used for listening. The ports 80 - 85 all have the LISTEN state.

For reference I am still very new to Centos / linux servers and have previously only used software like xampp to host servers.


When I visit (This is my servers internal IP address, it works fine with I get a long loading time followed by a "site could not be reached - too long to respond error".


Have I set things up properly in my httpd.conf file? Or is there something else that i'm not doing correctly.

If anymore information is needed please ask kindly and i will be glad to provide.

  • You would get a similar error when a firewall is configured to DROP rather than politely REJECT traffic to ports other than 80.
    – HBruijn
    Jan 3 '18 at 9:56
  • @HBruijn hmm this makes sense I will try enabling the ports, would the ports still have the "LISTEN" status if they are blocked? Jan 3 '18 at 10:00
  • @HBruijn Ahh this was the correct solution. If you could put this as the answer id be happy to accept it. Jan 3 '18 at 10:05

If the ports other than the default HTTP port TPC/80 are blocked by a "polite" firewall you would quickly get a "connection refused" error.

When a firewall is less polite, i.e. the firewall is configured with a DROP policy, then a a client will need to wait for the connection attempt to time-out before generating an error.

So check your firewall configuration.


looks like your httpd.conf only has the single port 81 hard code virtual host. You need a virtual host for each port or

  • 1
    This does not really look like an answer to the question.
    – kasperd
    Jan 9 '18 at 21:56
  • The problem was that I couldn't reach the single port that was hard coded in my config anyway, my question has already been answered. Jan 10 '18 at 8:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.