httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Turner" <>
Subject [users@httpd] DocumentRoot and UserDir conflict?
Date Mon, 05 Mar 2007 16:46:54 GMT
Hello -

I'm using Apache 2.0.47.  Due to site admin policies, I have limited
control of Apache's configuration, but am allowed to
supplement/override global config statements with the use of an
Include in httpd.conf.

I have a lot of Apache experience, but it is mostly virtual hosting
and mod_jk configuration on systems where I have total control. I've
read the documentation for DocumentRoot and UserDir, and have spent
the morning googling, but haven't found any previous discussions about
my specific issue, so I'm hoping folks here can help.

Goal: enable per-user directories so that developers can test code in
their own environments before pushing to a QA server.  This means HTML
as well as perl CGI in a conventional cgi-bin setup.

So far, I've got mod_userdir enabled, and the following directives configured:

UserDir disabled
UserDir /thishost/u/*/public_html
UserDir enabled john

<Directory /thishost/u/*/public_html>
    AllowOverride FileInfo AuthConfig Limit Indexes
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
        Order allow,deny
        Allow from all
        Order deny,allow
        Deny from all
<Directory /thishost/u/*/public_html/cgi-bin/>
    Options ExecCGI
    SetHandler cgi-script

My problem:

When I try to browse to http://devhost/~john, Apache is not looking in
/thishost/u/~john/public_html as expected.

Instead, it is looking in /proj/site/www/~john, as shown by the error log:

[Mon Mar 05 16:09:06 2007] [error] [client] File does not
exist: /proj/site/www/~john

"/proj/site/www" is the document root for the entire server.  I don't
have permission to change this, nor can I get it changed by asking.

How can I override the global config or otherwise "persuade" Apache to
look in "/thishost/u/~john" instead of "/proj/site/www/~john"?
There's no mention in the UserDir documentation that the UserDir has
to be a subdirectory of DocumentRoot, so it looks like I'm missing

I've tried various combinations of "disable" and "enable" with the
UserDir directive, and have also tried various position combinations
with the three UserDir directives shown above, such as putting
"disable" first, then the path, or the path first, then "disable"
second, etc.  No combination that I've tried gets me the ability to
serve pages and CGI out of my homedir.

Any and all help is appreciated...thank you in advance!


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message