I have configured an apache 2.2 server to forward requests to a tomcat 6 application listen on 8080/tcp. When the request is processed by apache, it duplicates the name of the application. So an error is posted on the browser. Apache and tomcat are living at the same server, behind a firewall. On the firewall, I have created a redirect rule to forward all 80/tcp requisitions to apache´s server. 8080 tcp port is blocked on firewall.
Here is my apache 2.2 config:
<VirtualHost *:80>
ServerName myaddress.com
ServerAlias myaddress.com
ServerAdmin [email protected]
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Location />
Order allow,deny
Allow from all
ProxyPass http://localhost:8080/portal
ProxyPassReverse http://localhost:8080/portal
</Location>
</VirtualHost>
Here is my server.xml config:
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" proxyPort="80" proxyName="myaddress.com"/>
When I type http://myaddress.com in the browser, the address is replaced by http://myaddress.com/portal and the following error message is showed:
HTTP Status 404 - /portalportal/
type Status report
message /portalportal/
description The requested resource (/portalportal/) is not available.
http://localhost:8080/portal
work? 404 simply means the app you looking for is not there. it's more likely the connector between tomcat and apache is reconfigured, check your mod_jk – Will