Reputation: 107
Tomcat7 server hosts a website on my machine and I want to use Apache2 as a proxy to see it through my browser: http://localhost:8080/examples as http://localhost/examples.
I have installed Apache2 and Tomcat7, they both work on my computer. I have loaded mod_proxy and mod_proxy_http modules
In my http_vhosts.conf file I have:
<VirtualHost *:80>
ProxyRequests off
SSLProxyEngine on
ProxyPreserveHost on
ServerName mathost.workstation.org
ProxyPass /examples http://localhost:8080/examples
ProxyPassReverse /examples http://localhost:8080/examples
ProxyRequests Off
</VirtualHost>
In my proxy_http.conf I have:
ProxyRequests Off
ProxyPreserveHost On
<Location "/examples/">
ProxyPass /examples http://localhost:8080/examples
ProxyPassReverse /examples http://localhost:8080/examples
Order deny,allow
Allow from all
</Location>
It doesn't work, apache logs say "GET /examples/ HTTP/1.1" 404 207".
Upvotes: 0
Views: 67
Reputation: 107
Solved. The problem was the path "/example/". I had to use the right url: "/example". Then, http_vhosts.conf had 2 vhost on port 80, absolute useless.
Upvotes: 1