You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Luca Stramenga <l....@openservers.it> on 2008/06/25 19:51:19 UTC

tomcat mod_proxy_ajp and root path

Hi,
We setup an Apache Tomcat servlet and JSP engine using mod_proxy ajp as
connector to host a JAVA application.

Here is the httpd.conf entry:

ProxyRequests Off
> ProxyVia Off
> ProxyPreserveHost On
> ProxyPass /servlet/ ajp://www.domain.com:8009/
> ProxyPassReverseCookiePath / /servlet
> ProxyPassReverse /servlet ajp://www.domain.com:8009/


 This is the server.xml entry:

Host name="domain.com" debug="0" appBase="/var/www/virtual/
> domain.com/htdocs/servlet" unpackWARs="false" autoDeploy="true"
> xmlValidation="false" xmlNamespaceAware="false">
>  <Logger className="org.apache.catalina.logger.FileLogger"
> directory="/usr/share/tomcat-5.5.26/logs" prefix="domain.com"
> suffix=".log" timestamp="true" />
>  <Alias>www.domain.com</Alias>
> </Host>



We have an URL issue when the application redirect to the root path. Here it
is what happens f.e.:
The application shows a login page at the address
http://www.domain.com/servlet/fp2008/ . When we try to logging in and click
submit, the server redirect us to http://www.domain.com/fp2008/ with 404
ERROR. (correct URL should be http://www.domain.com/*servlet*/fp2008/ )
This happens for every dynamic link created by the application when a user
perform an action.

Any suggestion will be appreciate. Many thanks.
Luca Stramenga
OpenServers.it #1 GameProvider

Re: tomcat mod_proxy_ajp and root path

Posted by Bill Barker <wb...@wilshire.com>.
"Luca Stramenga" <l....@openservers.it> wrote in message 
news:8663c4b50806251051n32fe8cd9n70060133dcd15a5d@mail.gmail.com...
> Hi,
> We setup an Apache Tomcat servlet and JSP engine using mod_proxy ajp as
> connector to host a JAVA application.
>
> Here is the httpd.conf entry:
>
> ProxyRequests Off
>> ProxyVia Off
>> ProxyPreserveHost On
>> ProxyPass /servlet/ ajp://www.domain.com:8009/
>> ProxyPassReverseCookiePath / /servlet
>> ProxyPassReverse /servlet ajp://www.domain.com:8009/
       ^^^ Remove this line.  It isn't needed for AJP/1.3, and I'm going to 
bet that it is confusing mod_proxy.  With AJP/1.3, the ProxyPassReverse is 
handled on the Tomcat side.
>
>
> This is the server.xml entry:
>
> Host name="domain.com" debug="0" appBase="/var/www/virtual/
>> domain.com/htdocs/servlet" unpackWARs="false" autoDeploy="true"
>> xmlValidation="false" xmlNamespaceAware="false">
>>  <Logger className="org.apache.catalina.logger.FileLogger"
>> directory="/usr/share/tomcat-5.5.26/logs" prefix="domain.com"
>> suffix=".log" timestamp="true" />
>>  <Alias>www.domain.com</Alias>
>> </Host>
>
>
>
> We have an URL issue when the application redirect to the root path. Here 
> it
> is what happens f.e.:
> The application shows a login page at the address
> http://www.domain.com/servlet/fp2008/ . When we try to logging in and 
> click
> submit, the server redirect us to http://www.domain.com/fp2008/ with 404
> ERROR. (correct URL should be http://www.domain.com/*servlet*/fp2008/ )
> This happens for every dynamic link created by the application when a user
> perform an action.
>
> Any suggestion will be appreciate. Many thanks.
> Luca Stramenga
> OpenServers.it #1 GameProvider
> 




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


RE: tomcat mod_proxy_ajp and root path

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Luca Stramenga [mailto:l.stramenga@openservers.it]
> Subject: tomcat mod_proxy_ajp and root path
>
> >  <Logger className="org.apache.catalina.logger.FileLogger"
> > directory="/usr/share/tomcat-5.5.26/logs" prefix="domain.com"
> > suffix=".log" timestamp="true" />

If you're really using Tomcat 5.5 (you didn't bother to tell us), there is no <Logger> element in that level; that's not causing the problem, but should be fixed.

> The application shows a login page at the address
> http://www.domain.com/servlet/fp2008/

Looks like you're still trying to use the InvokerServlet, which you really, really don't want to do.  Read this:
http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q3

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.

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