0

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.

Problem

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

Question

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 03 '18 at 09:56
  • @HBruijn hmm this makes sense I will try enabling the ports, would the ports still have the "LISTEN" status if they are blocked? – Yasmin French Jan 03 '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. – Yasmin French Jan 03 '18 at 10:05

2 Answers2

1

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.

HBruijn
  • 77,029
  • 24
  • 135
  • 201
0

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

jal
  • 1
  • 1