I have apache in front of Jboss working on 80 port and jboss listens to 8080. Apache forwards every request to Jboss. So its quiet standard scenario nothing fancy . . .
My first task was to log real ip in jboss log. (Coz I have proxy inside apache server and rewrite Engine.)
<VirtualHost *:80> ServerName test.com ServerAlias test.com CustomLog /var/log/httpd/access.log combined RewriteEngine on RewriteLogLevel 5 RewriteLog "/var/log/httpd/rewrite.log" RewriteRule ^/test.txt$ /someurl/search.cgi?iHash=somehash [P] RewriteRule ^/test2$ /just/static/url/ [P] ProxyRequests off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / http://test.com:8080/ ProxyPassReverse / http://test.com:8080/
So I solved this problem with ajp:
<Location /test2> ProxyPass ajp://localhost:8009/just/static/url/ ProxyPassReverse ajp://localhost:8009/just/static/url/ </Location>
But now the problem Is, that it only works for static url not with hashed url. The problem is that apache kinda redirects url, but i get HTTP Status 404 error from Jboss. Maybe someone had the same problem or know the solution. :)