tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Eggers <>
Subject Re: Why doesn't my context work?
Date Thu, 29 Sep 2005 19:45:22 GMT
--- Michael Sullivan <> wrote:

[ lots of stuff snipped ]

OK, I finally got around to putting this together on
my Limux (Fedora Core 4) box.

My environment:
2.6.12-1.1456_FC4 running on a Dell 8200 with 768 MB
java 1.5.0_04-b05
apache 2.0.54
tomcat 5.5.9

My configurations:

# httpd.conf stuff
LoadModule        jk_module modules/

JkWorkersFile     /etc/httpd/conf/
JkLogFile         logs/mod_jk.log
JkLogLevel        warn
JkLogStampFormat  "[%a %b %d %H:%M:%S %Y] "
JkShmFile         logs/shm-file

LoadModule userdir_module modules/
<IfModule mod_userdir.c>
    UserDir enable username

<Directory /home/*/webspace>
  AllowOverride FileInfo AuthConfig Limit
  Options MultiViews Indexes SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    <LimitExcept GET POST OPTIONS>
        Order deny,allow
        Deny from all

# Adding JkMounts for UserDir
JkMount /~*/*.jsp     local
JkMount /~*/*/*.jsp   local
JkMount /~*/servlet/* local
JkMount /~*/*.do      local

# stuff - mostly default for now

# one to serve the applications

# server.xml stuff in Tomcat under <Host></Host>
<!-- adding listener to test local host directories

1. Add the appropriate user names in the line:

    UserDir enable username

This is a space-separated list of user names. 
Otherwise you can just have:

UserDir enabled

to get them all.

2. Excuse the wrapping in the Options line under the
Directory directive.
This is just a bare bones one.  There are lots of
options to explore.

This is the listener that will add the same directory
to Tomcat that was added to Apache with the userdir

You will get a single web application under
/~username.  If you look at Tomcat's manager
application, you will see a /~username application.

I ran the first application from the "Head First
Servlets & JSP" book (my standard "is it working"
application) and this setup worked.

One thing to note.  I did not get Tomcat to explode a
war file in /~username.  I had to explode the war
manually in ~username/webspace.

I didn't see a way of adding multiple user
applications by using this listener.  I just did a
quick scan of the UserConfig javadoc.  My guess is
that if you want multiple web applications per user
you will have to set up a virtual host for each user.

Just some thoughts.



Yahoo! for Good 
Donate to the Hurricane Katrina relief effort. 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message