> Can this behavior be accomplished with mod proxy alone (meaning I can
> remove mod rewrite from the picture completely)? Could this rewrite be 
> causing me to lose the session between Apache and Tomcat?

*ding ding ding*
We have a winner! I removed the rewrite rules from my httpd-vhosts.conf file
and hit my web app that way, and the session is not lost! So I now know the
cause of the problem is my URL rewriting, however this creates another
problem. The client does not want to see urls with an identifier on the end
of them (i.e. www.abcdomain.com/abc), yet I need the identifier to correctly
send the request to the correct container in Tomcat (meaning the abc app
lives under the /abc folder under webapps in Tomcat). So when a request
comes in for www.abcdomain.com I need to forward that request to Tomcat with
an /abc on the end of it so that Tomcat correctly resolves it to the "abc"
application and then when the response is returned to the user the url still
appears as www.abcdomain.com with no /abc identifier after it. (Does this
make sense? I could be doing a bad job of explaining this.) Is there an easy
way to resolve this that I'm not aware of through Apache or Tomcat? Perhaps
using mod_proxy?

Here are my relevant files:

[file: httpd-vhosts.conf]
...
<VirtualHost www.abcdomain.com>
    ServerAdmin [EMAIL PROTECTED]
    DocumentRoot /workfiles/abc/webapps/abcdomain.org/trunk/www/htdocs
    ServerName abcdomain.com
    ErrorLog logs/abc/www.abcdomain.com-error_log
    CustomLog logs/abc/www.abcdomain.com-access_log common
    ProxyRequests Off
    ProxyPass /abc http://localhost:8081/abc
    ProxyPassreverse / http://localhost:8081/abc/
    RewriteEngine on
    RewriteCond %{REQUEST_URI} !^/abc
    RewriteRule ^/(.*)$ /abc/$1 [P]
</VirtualHost>
...
[file: server.xml]
...
    <Connector port="8081" maxHttpHeaderSize="8192"
               maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true"
               proxyName="www.abcdomain.com" proxyPort="80"/>
...


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to