Caldarale, Charles R a écrit :
type Status report
message /~paul/test.jsp
description The requested resource (/~paul/test.jsp)
is not available.
Does the userid Tomcat is running under have access to the file in question?
If not, you'll always get the 404.
Hello and thank you for your reply.
By now, I'm running it with the root user (I'm testing), but the NFS
share is mounted with the no_root_squash option.
However, from / till the public_html, all the directories have rx access
for everybody (and the .jsp as well), so I guess the files should be
readable. (Actually, if I remove the :8080 in the URL, the source code
is displayed, even Apache is running under www user)
If I change the homedirectory to a local directory,
it works fine.
What do you mean by "the homedirectory"? Tomcat's? The user's? Your own?
I meant users home directories.
Actually, for this test, I unmounted the NFS share, then copied my own
home directory on the local filesystem (with the same rights).
Usually, I mount the NFS share on /NFS, but for this test I did:
umount /NFS
mkdir -p /NFS/homes/paul/public_html
vi /NFS/homes/paul/public_html/test.jsp
chmod -R 755 /NFS
Then on http://server:8080/~paul/test.jsp the jsp is executed.
But this doesn't work:
<Listener className="org.apache.catalina.startup.UserConfig"
directoryName="public_html"
homeBase="/NFS/homes/"
userClass="org.apache.catalina.startup.HomesUserDatabase"/>
Where is the above <Listener> located? What does "doesn't work" mean? Be
specific.
What I meant by "doesn't work" is the symptom I described above: the
Tomcat 404 error:
type Status report
message /~paul/test.jsp
description The requested resource (/~paul/test.jsp) is not available.
The Listener is in the server.xml, inside the <Host>. Below, the whole file:
== server.xml ==
<?xml version='1.0' encoding='utf-8'?>
<Server port="8005" shutdown="SHUTDOWN">
<Listener className="org.apache.catalina.core.AprLifecycleListener"
SSLEngine="on" />
<Listener className="org.apache.catalina.core.JasperListener" />
<Listener className="org.apache.catalina.mbeans.ServerLifecycleListener" />
<Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
<GlobalNamingResources>
<Resource name="UserDatabase" auth="Container"
type="org.apache.catalina.UserDatabase"
description="User database that can be updated and saved"
factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
pathname="conf/tomcat-users.xml" />
</GlobalNamingResources>
<Service name="Catalina">
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />
<Engine name="Catalina" defaultHost="localhost">
<Realm className="org.apache.catalina.realm.UserDatabaseRealm"
resourceName="UserDatabase"/>
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<!-- MY OWN CONFIGURATION -->
<DefaultContext reloadable="true">
</DefaultContext>
<Listener className="org.apache.catalina.startup.UserConfig"
directoryName="public_html"
homeBase="/NFS/homes/"
userClass="org.apache.catalina.startup.HomesUserDatabase"/>
<!-- / MY OWN CONFIGURATION -->
</Host>
</Engine>
</Service>
</Server>
== /server.xml ==
Sorry for my lack of details and thanks for your help.
Anthony
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org