You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Jeffrey M. Bischoff" <JB...@bds.com> on 2000/07/12 16:38:58 UTC

Help with Tomcat + Apache: Servlets & Aliases

Hi,

I have Tomcat and Apache deployed on a linux machine. Both webservers work
fine on their own. I want Apache to redirect jsp files and servlets to
Tomcat. My automatically-generated tomcat-apache.conf file is included in
the Apache conf and as far as I can tell from examples in the readme and
faq's everything is configured correctly. I am trying to get the examples
that come with tomcat to work.

My problem is that although apache passes .jsp files to jakarta and they
work fine, it does not pass along requests for servlets. Instead it gives
the apache 404 error page. I have been able to get apache to pass on these
requests to Tomcat by removing the aliases from the tomcat-apache.conf file.
When I do this the servlets work fine, but apache cannot find the static
content or the jsp's (because without the alias it doesn't know where in the
filesystem they are).

Has anyone else had this problem? Do you know why it is happening and what
workarounds I could use to resolve it?

Any help or suggestions would be appreciated.

-Jeff Bischoff

Here is my tomcat-apache.conf file:

Buffers Files Tools Edit Search Mule Help
LoadModule jserv_module libexec/mod_jserv.so
ApJServManual on
ApJServDefaultProtocol ajpv12
ApJServSecretKey DISABLED
ApJServMountCopy on
ApJServLogLevel notice

ApJServDefaultPort 8007

AddType test/jsp .jsp
AddHandler jserv-servlet .jsp
Alias /examples /home/jakarta-tomcat/webapps/examples
<Directory "/home/jakarta-tomcat/webapps/examples">
    Options Indexes FollowSymLinks
</Directory>
ApJServMount /examples/servlet /examples
<Location /examples/WEB-INF/ >
    AllowOverride None
    deny from all
</Location>

Alias /test /home/jakarta-tomcat/webapps/test
<Directory "/home/jakarta-tomcat/webapps/test">
    Options Indexes FollowSymLinks
</Directory>
ApJServMount /test/servlet /test
<Location /test/WEB-INF/ >
    AllowOverride None
    deny from all
</Location>

ApJServMount /servlet /ROOT