ProxyPass funktioniert nicht unter Ubuntu 14

ProxyPass funktioniert nicht unter Ubuntu 14

Während ich mit Ubuntu 12.04 keine Probleme habe, kann ich bei einer Neuinstallation von 14.04 meine App in Tomcat nicht von Port 8080 auf 80 proxyen. Ich habe in apache.conf Folgendes hinzugefügt:

ProxyRequests     Off
ProxyPreserveHost On
ProxyPass /myapp http://localhost:8080/myapp
ProxyPassReverse /myapp http://localhost:8080/myapp

Aber ich erhalte die Fehlermeldung:

[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: localhost

Ich habe mehrere Konfigurationen ausprobiert, aber die Verbindung ist immer abgelaufen.

Antwort1

Dieses Problem hing damit zusammen iptables, dass der Loopback-Port blockiert wurde. Ich musste hinzufügen:

sudo iptables -I INPUT 1 -i lo -j ACCEPT

verwandte Informationen