On Sun, 2005-09-25 at 23:21 -0700, Mark Eggers wrote:
> --- Michael Sullivan <[EMAIL PROTECTED]> wrote:
>  
> > Right now I use symlinks
> > to my individual
> > users' website directories, but now that I've
> > discovered Alias I'll
> > probably switch completely to using Aliases.
> 
> Good.  
> > I
> > created a test Alias
> > point to the ~/webspace/webapps directory in my
> > personal account, but I
> > can't seem to JkMount it, and I can't figure out
> > why.  Here is the
> > mod_jk portion of my httpd.conf file:
> > 
> > #mod_jk stuff
> > 
> > LoadModule jk_module                    
> > modules/mod_jk.so
> > 
> > JkMount /*.jsp wrkr
> 
> I think your JSP JkMount line will only get
> <hostname>/*.jsp.  It won't match <hostname>/*/*.jsp. 
> I think you'll need another line in there that says:
> 
> JkMount /*/*.jsp wrkr
> 
> > JkMount /servlet/* wrkr
> 
> You will probably have the same issue with the servlet
> matching.  Try this instead:
> 
> JkMount /*/servlet/* wrkr
> 
> Good idea here.
> 
> > # Deny direct access to WEB-INF
> > <LocationMatch ".*WEB-INF.*">
> >    AllowOverride None
> >    deny from all
> > </LocationMatch>
> 
> Good start.
> 
> > Alias /michael /home/michael/webspace/webapps
> 
> I would probably change some of the Directory
> directives.  Since this lives outside your normal
> DocumentRoot, this Directory is not going to inherit
> the permissions you gave to DocumentRoot.
> 
> Something like the following might work better:
> 
> <Directory /home/michael/webspace/webapps>
>   Options Indexes
>   Allow Override None
>   Order allow,deny
>   Allow from all
> </Directory>
> 
> > <Directory /home/michael/webspace/webapps>
> >     Options FollowSymLinks
> >     AllowOverride None
> > </Directory>
> 
> I tend to put the Directory and Aliases before the
> JkMount statement, if I do that, then I can do the
> following:
> 
> Alias /michael /home/michael/webspace/webapps
> <Directory /home/michael/webspace/webapps>
>   Options Indexes
>   Allow Override None
>   Order allow,deny
>   Allow from all
> </Directory>
> 
> JkMount /michael/*.jsp wrkr
> JkMount /michael/*/*.jsp wrkr
> JkMount /michael/*/servlet/* wrkr
> 
> Finally, make sure the user Tomcat is running as has
> read access to everything in
> /home/michael/webspace/webapps.
> 
> If there are a lot of applications, you can group all
> the <Directory> directives, followed by all the Alias
> directives, followed by all the JkMount statements.
> 
> Another way to organize your httpd.conf file is by
> application.  In other words, for each application:
> 
> <Directory>
>   # directory directives
> </Directory>
> Alias /<desired_mapping> /<directory_napping>
> JkMount /<desired_mapping>/*.jsp <tomcat-worker>
> JkMount /<desired_mapping>/servlet/* <tomcat-worker>
> 
> I'm away from my system right now, but I think either
> of these methods should work fine.
> 
> The ugly thing about doing it this way is that every
> time you add a new user, you'll have to update Apache,
> which means you'll have to stop and start the server.
> 
> If you could get the user directory idea to work, then
> everything would just "happen".
> 
> HTH
> 
> /mde/


Here is my updated mod_jk section in /etc/apache2/httpd.conf:

#mod_jk stuff

LoadModule jk_module                     modules/mod_jk.so

JkMount /*.jsp wrkr
JkMount /*/*.jsp wrkr
JkMount /servlet/* wrkr
JkMount /*/servlet/* wrkr
# Deny direct access to WEB-INF
<LocationMatch ".*WEB-INF.*">
   AllowOverride None
   deny from all
</LocationMatch>
Alias /michael /home/michael/webspace/webapps
<Directory /home/michael/webspace/webapps>
    Options Indexes
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

JkMount /michael/*.jsp wrkr
JkMount /michael/*/*.jsp wrkr
JkMount /michael/*/servlet/* wrkr


It still doesn't work.  Everything in the directory tree from /home
to /home/michael/webspace/webapps/colors.jsp is all readable/executable.
I don't know why this isn't working.  www.espersunited.com/index.jsp
still works though, but www.espersunited.com/michael/colors.jsp gives me
Tomcat 404.


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

Reply via email to