0

I have got the following configuration for my apache webserver (httpd.conf):

...
Listen 80
Listen 8082
...
<VirtualHost *:80>
    ProxyPass / ajp://localhost:8009/
    ProxyPassReverse / ajp://localhost:8009/
</VirtualHost>
<VirtualHost *:8082>
    ProxyPass / ajp://localhost:8010/
    ProxyPassReverse / ajp://localhost:8010/
</VirtualHost>

The ports 8009 and 8010 are used by two tomcat instances. All three are up and running. However, I'm only able to access the content on port 80. When I try to access the content on port 8082 I get the following error:

503 Service Temporarily Unavailable - The server is temporarily unable to service your request due to maintenance downtime or capacity problems.

Do you have any ideas? Maybe I'm searching at the wrong spot.

gabriel
  • 1
  • 1

2 Answers2

0

Because you are connecting on a non-standard port my guess is SELinux. I would advice you to enter setsebool httpd_can_network_connect 1 and then try again.

  • Thank you! However, I managed to enable it by using the `semanage` command and adding the required ports to `http_port_t`. Wouldn't that be better as only certain ports are allowed then? – gabriel Aug 24 '16 at 11:29
  • You have a point. With `setsebool ...` you allow for tcp traffic for all ports. With `http_port_t` you can allow for traffic for specific port. You were able to connect by :80 because ports 80, 8009 are allowed by default. Useful thing: `semanage port -l grep http_port_t` – user3719787 Aug 24 '16 at 12:57
0

Try a wget/curl on http://localhost:8082/ from the command line of the server Apache httpd is running on.

If these work then you have a network connectivity issue, maybe iptables or similar.

If they don't work then Apache httpd has failed to bind to port 8082. The possible reasons, though not all will be relevant to you, for apache httpd not being able to bind to an IP/port are detailed here:

http://wiki.apache.org/httpd/CouldNotBindToAddress

Unbeliever
  • 2,336
  • 1
  • 10
  • 19