Tomcat – Reading .htaccess and Tomcat

.htaccessapache-2.2tomcat

I've have a java application running on tomcat and i'm using the apache mod_proxy module to pass the files to tomcat, however tomcat seems to be ignore the .htaccess files, here my vhost.conf. How can I instruct apache to read the .htaccess and still server the jsp.

DirectoryIndex index.jsp index.htm index.html index.php  

ProxyRequests Off
ProxyPreserveHost On

<Proxy *>
        Order deny,allow
        Allow from all
</Proxy>
ProxyPass / http://localhost:9080/SouthSide_815/
ProxyPassReverse / http://localhost:9080/SouthSide_815/

RewriteLog /etc/httpd/logs/rewrite.log
RewriteLogLevel 3

DocumentRoot /usr/share/tomcat6/psa-webapps/southside815.com/SouthSide_815

<Directory /usr/share/tomcat6/psa-webapps/southside815.com/SouthSide_815>
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

On a sidenote, with the above configuration, when apache parses this configuration file and reaches the proxy part, will it proxy everything to tomcat and ignore the rest of the lines (DocumentRoot, Directory…)?

Best Answer

.htaccess is meaningful to httpd only. Once a request is passed over to Tomcat, it is under rules of Tomcat's realm. You may handle a part of Apache's namespace to Tomcat though.

Related Topic