Ich versuche, Tomcat in Apache zu integrieren. Mein Ziel ist es, alle Anfragen mit http://localhost/myappan umzuleiten
http://localhost:8080
Ich habe diese Anleitung befolgt: http://tomcat.apache.org/tomcat-8.0-doc/proxy-howto.html
Mein httpd.confsieht so aus:
Include conf.modules.d/*.conf
LoadModule proxy_module modules/mod_proxy.so
ProxyPass /myapp http://localhost:8080 retry=0 timeout=5
ProxyPassReverse /myapp http://localhost:8080
Meine server.xml in apache-tomcat sieht folgendermaßen aus:
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" proxyPort="80" />
Wenn ich jetzt die URL versuche http://localhost/myapp, gibt es einen 503 Service UnavailableFehler.
Sowohl Tomcat als auch Apache sind betriebsbereit. Die URL http://localhost:8080funktioniert gut.
Kann es ein Problem mit Dateiberechtigungen geben?
Für tomcatden Benutzer und die Gruppe sind root/rootund für httpd, der Benutzer und die Gruppe sindapache/apache
Vermisse ich etwas oder mache ich es falsch?
Die HTTPD-Version ist 2.4.6 und die Tomcat-Version ist 8.0
Die httpd-Fehlerprotokolle:
[proxy:error] [pid 19905] (13)Permission denied: AH00957: HTTP: attempt to connect to 127.0.0.1:8080 (localhost) failed
[proxy:error] [pid 19905] AH00959: ap_proxy_connect_backend disabling worker for (localhost) for 0s
[proxy_http:error] [pid 19905] [client ::1:51615] AH01114: HTTP: failed to make connection to backend: localhost
Gelöst!
Die Antwort ist hier: http://sysadminsjourney.com/content/2010/02/01/apache-modproxy-error-13permission-denied-error-rhel/