I have a site say http://www.example.com which is running on tomcat proxied via apache.
Mapping is something like
<Location /pay/>
ProxyPass ajp://localhost:8009/pay/
ProxyPassReverse ajp://localhost:8009/pay/
</Location>
<LocationMatch />
ProxyPass ajp://localhost:8009/
ProxyPassReverse ajp://localhost:8009/
</LocationMatch>
Now I created a virtual host called static.example.com
<VirtualHost *:80>
ServerName static.example.com
ServerAlias static.example.com static
DocumentRoot /opt/apache/current/htdocs/example
ScriptAlias /cgi-bin/ /opt/apache/current/cgi-bin/
<Directory /opt/apache/current/htdocs/example>
Order allow,deny
Allow from all
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /opt/apache/current/cgi-bin>
Order allow,deny
Allow from all
Options None
AllowOverride None
</Directory>
</VirtualHost>
Now when I do [
static.example.com...] it opens content of http://example.com. But when I comment out LocationMatch / proxy mapping like
#<LocationMatch />
# ProxyPass ajp://localhost:8009/
# ProxyPassReverse ajp://localhost:8009/
#</LocationMatch>
correct page from static.example.com is displayed. So it means I have to bypass proxy for static.example.com.
I tried
ProxyPass static.example.com !
but it doesn't seem to be working. Can anyone help.