ProxyPass not working on Ubuntu 14
While I have no problem with Ubuntu 12.04, in a fresh 14.04 installation I cannot proxy my app in Tomcat from port 8080 to 80. I added in the apache.conf the following:
ProxyRequests Off
ProxyPreserveHost On
ProxyPass /myapp
ProxyPassReverse /myapp But I get the error:
[proxy:error] (110)Connection timed out: AH00957: HTTP: attempt to connect to 127.0.0.1:8080 (localhost) failed
[proxy:error] ap_proxy_connect_backend disabling worker for (localhost) for 60s
[proxy_http:error] AH01114: HTTP: failed to make connection to backend: localhostI tried several configurations but the connection always timed out.
101 Answer
This issue was related to iptables that was blocking the loopback port. I needed to add :
sudo iptables -I INPUT 1 -i lo -j ACCEPT