tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <christopher.d.schu...@comcast.net>
Subject Re: Fwd: Help, only viewing source of my index.jsp page - Apache 2.0.48 Tomcat 4.1.29 mod_jk_1.2.5_2.0.47.dll
Date Mon, 22 Dec 2003 14:46:22 GMT
Lenny,

> My problem is that when I enter www.mysite.com the source from my
> index.jsp is displayed.

This is almost always a misconfiguration of JkMount directives.

> It appears that the virtualhost setup in my
> http.conf is finding the mysite directory in Tomcat, but for some
> reason cannot display the index page as it should. I have index.jsp
> setup in my web.xml as my welcome page.
> 
 > <VirtualHost www.mysite.com>
 > ServerName www.mysite.com
 >
 > # Static files
 >
 > 	DocumentRoot D:/java/Tomcat41/webapps/mysite
 > 	Alias /mscarloans "D:/java/Tomcat41/webapps/mysite"
 > 	
 > 	JkMount /mscarloans/*.jsp  ajp13

This line maps all JSP files in the /mscarloans/ tree to be sent to 
Tomcat for processing. There doesn't appear to be any other JkMount for 
this VirtualHost. I think you want thic changed to something like:

JkMount /*.jsp ajp13

 >     <Location "/mysite/WEB-INF/*">
 >         AllowOverride None
 >         deny from all
 >     </Location>

Good call! Lots of people forget about this!

 >      <Directory "D:/java/Tomcat41/webapps/mysite/WEB-INF/">
 >         AllowOverride None
 >         deny from all
 >      </Directory>

You should generally do the <Directory> one. That makes it so that, no 
matter what strange location and URL games are played, any request that 
ultimately points to files in this directory are denied. With the 
<Directory> config, you don't even need the <Location> config.

Hope that helps,
-chris


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message