Yes, that was the problem (it was a really stupid problem).

I still have the problem with the symlinks:
in the webapps/mytest directory I have a subdirectory that is a symlink:
cd /var/tomcat4/webapps/mytest
ln -s /tmp/mydir mydir
the directory /tmp/mydir has the right permissions and also the symlink

If I ask the page http://myserver/mytest/mydir, I get an ERROR 404 response.
The problem is that this response comes from Apache Tomcat 4.1 and not form
Apache 1.3.12!!
I also tried to make an alias to the symlinked directory and then to the
real directory, and then I removed the symlink (leaving the alias), but
nothing worked:

JkMount /mytest/* ajp13
JkMount /mytest/*.jsp ajp13
Alias /mytest "/var/tomcat4/webapps/mytest"
Alias /mytest/mydir "/var/tomcat4/webapps/mytest/mydir"
<Directory "/var/tomcat4/webapps/mytest">
    AllowOverride None
    Options Indexes FollowSymLinks
</Directory>
<Location "/mytest">
    allow from all
</Location>
<Location "/mytest/Connections/">
    deny from all
</Location>

The same if I ask a directory that is under mytest: I get the directory
listing from Apache Tomcat/4.1 and not from the Apache webserver.
To make a test, if I stop Tomcat and leave an alias for Apache to
/mytest/mydir, I get an ERROR 500 - Internal Server Error (of course,
because Apache does not find the connection with Tomcat).

I thought that, making the alias, all the static resources were served by
apache webserver, not from Tomcat (I do not have an Http connector for
Tomcat configured).
It seems that Tomcat serves all the resources under his contexts, also if
you make an alias in Apache WebServer!
With Tomcat3 all that worked fine!

Bah, I will spend another lot of time testing and trying and reading
documentation.

By,
Marco.


----- Original Message -----
From: "Bill Barker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 13, 2002 11:07 AM
Subject: Re: Error 403 using an Alias with Apache + Tomcat4


> Apache needs read+execute access on all directories up to and including
the
> Tomcat directory for the user the Apache runs under (which I believe is
> 'apache' for the default RedHat install, but I don't really use RedHat
> myself).
>
> "Marco Bucciarelli" <[EMAIL PROTECTED]> wrote in message
> 003d01c2a1ce$28baa250$[EMAIL PROTECTED]">news:003d01c2a1ce$28baa250$[EMAIL PROTECTED]...
> I have a problem with Apache 1.3.12 and Tomcat 4.1.12 on a Linux RedHat
7.0.
> I tried both mod_jk and mod_webapp to let Tomcat and Apache talk together,
> now I am using mod_jk but I experienced this problem with both connectors.
> The problem is this:
> if I give an Alias directive to Apache, for a directory that is a Tomcat
> application, I get always an Error 403 - Forbidden from Apache. If I do
not
> give the alias directive, every file is served by Tomcat and everything
> works, but Tomcat does not serve files that reside on a directory that is
a
> symlink (not on my installation, perhaps thare is some directive to give
to
> Tomcat).
> I tried the JkAutoAlias, I tried to make an alias for the directory that
is
> a symlink, but nothing worked.
>
> Here are my httpd.conf and mod_jk.conf files:
>
> ********* START httpd.conf **********
> ...
> ...
>  <IfDefine HAVE_JK>
>  LoadModule jk_module modules/mod_jk.so
>  AddModule  mod_jk.c
>  Include /var/tomcat4/conf/mod_jk.conf
>  </IfDefine>
>
> ********* END httpd.conf **********
>
> ********* START mod_jk.conf **********
>
> ###################################################################
> # The following line instructs Apache to load the jk module
> #
> #LoadModule jk_module modules/mod_jk.dll
>
> ###################################################################
> JkWorkersFile /var/tomcat4/conf/workers.properties
> JkLogFile     /var/tomcat4/logs/mod_jk.log
>
> ###################################################################
> # Log level to be used by mod_jk
> #
> #JkLogLevel Information
> JkLogLevel error
>
> ###################################################################
> # context mounts for Tomcat
> #
> #JkAutoAlias /var/tomcat4/webapps
> #JkMount /*.jsp ajp13
> #JkMount /* ajp13
>
> JkMount /mytest/* ajp13
> JkMount /mytest/*.jsp ajp13
> Alias /bignami "/var/tomcat4/webapps/mytest"
> <Directory "/var/tomcat4/webapps/mytest">
>     AllowOverride None
>     Options Indexes FollowSymLinks
> </Directory>
> <Location "/mytest">
>     allow from all
> </Location>
> <Location "/mytest/Connections/">
>     deny from all
> </Location>
>
> ********* END mod_jk.conf **********
>
> Thanks,
> Marco.
>
>
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to