Hello,

I have a question about running Tomcat behind Apache HTTP server.  I hope
this is not inappropriate for this list.

I am running a website on Tomcat 7.0.33, behind Apache 2.2.15, on CentOS
6.3 (using Tomcat connector 1.2.37).  I would like the user to go to our
base URL (http://www.example.com), but have the request served by a web
application running on Tomcat (I have the connector working, so that you
can access the application through http://www.example.com/application/).

I thought this could be accomplished through a rewrite rule on the HTTP
server, but I can't seem to get it to work, nor can I find much information
on it.  I can't really find any best practices around this, either.  Has
anyone done this successfully?

I have tried many things, but this is what I currently have in httpd.conf:

<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
    RewriteEngine On
        <IfModule mod_rewrite>
        RewriteBase /
        RewriteRule ^/ application/ [NC]
        RewriteLog "/etc/httpd/logs/rewrite.log"
        RewriteLogLevel 9
    </IfModule>
</Directory>

I did confirm that the rewrite module is loaded.  Any insights would be
greatly appreciated.

Thanks,
Dhruva

Reply via email to