I'm trying to get apache to route app.example.com to app.example.com/app where the application is running on tomcat. With the code below I keep getting infinite loop errors.
Httpd.conf
NameVirtualHost *:80
<VirtualHost *:80>
ServerName app.example.com
ServerAlias app.example.com
<IfModule mod_rewrite.c>
ProxyPass /app http://app.example.com:8080/app/
ProxyPassReverse /app http://app.example.com:8080/app/
ProxyPreserveHost off
<Location "/app">
Order allow,deny
Allow from all
</Location>
RewriteCond %{HTTP_HOST} ^app\.example\.com$ [NC]
RewriteRule ^(.*)$ http://app.example.com/app/ [L,PT]
RewriteEngine On
</IfModule>
</VirtualHost>
Tomcat server.xml snippet
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443"
proxyPort="80" />