You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Jerry Ford <jf...@katzenjammer.us> on 2003/01/01 01:24:53 UTC

[users@httpd] userdir doesn't work

I can't get userdir to work on  a localhost install of Apache 1.3.27. 
 I'm using the same directives in httpd.conf that are in my live server 
installation, where it does work. (Red Hat Linux 7.1 on both boxes.) 

Am I overlooking something in the config, or does userdir not work on a 
localhost?

Here's what's in both conf files:

LoadModule userdir_module     libexec/mod_userdir.so     
AddModule mod_userdir.c 

...

<IfModule mod_userdir.c>
    UserDir public_html
</IfModule>

...

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

Works when I go to my home page on the live server; but when I try 
httpd://localhost/~jford on the localhost server, I get a Forbidden 
message---don't have permission to access /~jford on this server.




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] userdir doesn't work

Posted by Jerry <jf...@katzenjammer.us>.
Yessss!!! Thanks for the tip, Rich.

In my localhost testbed environment, I have a <Virtual Host localhost>
block in httpd.conf for passing jsp and servlet requests to Tomcat 4.1.

I assume that was interfering with the UserDir public_html directive,
because when I change it to an absolute /home/*/public_html, it works.

In my live-server setup, Apache sends jsps and servlets to Tomcat 3.2,
which does not use the Virtual Host configuration, so the simple
public_html is enough.

Jerry

Jerry Ford wrote:

 > Thanks,  error_log does indeed point out the problem:
 >
 > "/usr/local/webserver/apache/htdocs/home/~jford/  does not exist"
 >
 > But why is Apache looking there?  Again, syntax on both boxes is the
 > same:
 >
 > DocumentRoot "/usr/local/webserver/apache/htdocs"
 > UserDir public_html
 > <Directory /home/*/public_html>
 >    ...
 > </Directory>
 >
 > On one it works and on the other it doesn't.
 >
 > Jerry
 >
 > Rich Bowen wrote:
 >
 > >On Tue, 31 Dec 2002, Jerry Ford wrote:
 > >
 > >
 > >
 > >>I can't get userdir to work on  a localhost install of Apache 1.3.27.
 > >> I'm using the same directives in httpd.conf that are in my live server
 > >>installation, where it does work. (Red Hat Linux 7.1 on both boxes.)
 > >>
 > >>
 > >
 > >...
 > >
 > >
 > >
 > >><Directory /home/*/public_html>
 > >>    AllowOverride FileInfo AuthConfig Limit
 > >>    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
 > >>    <Limit GET POST OPTIONS PROPFIND>
 > >>        Order allow,deny
 > >>        Allow from all
 > >>    </Limit>
 > >>    <LimitExcept GET POST OPTIONS PROPFIND>
 > >>        Order deny,allow
 > >>        Deny from all
 > >>    </LimitExcept>
 > >></Directory>
 > >>
 > >>Works when I go to my home page on the live server; but when I try
 > >>httpd://localhost/~jford on the localhost server, I get a Forbidden
 > >>message---don't have permission to access /~jford on this server.
 > >>
 > >>
 > >
 > >What does the error log say? The Forbidden message is the message that
 > >goes to the browser, but the real error message is in the error log.
 > >
 > >Make sure that the permissions on /home/*/public_html are such that the
 > >'nobody' user can read and execute:
 > >
 > >chmod 755 /home
 > >chmod 755 /home/*
 > >chmod 755 /home/*/public_html
 > >chmod 644 /home/*/public_html/*
 > >
 > >This will probably solve the problem, but check the error log anyway. It
 > >could also be an Indexes problem.
 > >
 > >
 > >
 >
 >
 >
 > ---------------------------------------------------------------------
 > The official User-To-User support forum of the Apache HTTP Server
 > Project.
 > See <URL:http://httpd.apache.org/userslist.html> for more info.
 > To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
 >   "   from the digest: users-digest-unsubscribe@httpd.apache.org
 > For additional commands, e-mail: users-help@httpd.apache.org




---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] userdir doesn't work

Posted by Jerry Ford <jf...@katzenjammer.us>.
Thanks,  error_log does indeed point out the problem:

"/usr/local/webserver/apache/htdocs/home/~jford/  does not exist"

But why is Apache looking there?  Again, syntax on both boxes is the same:

DocumentRoot "/usr/local/webserver/apache/htdocs"
UserDir public_html
<Directory /home/*/public_html>
    ...
</Directory>

On one it works and on the other it doesn't.

Jerry

Rich Bowen wrote:

 >On Tue, 31 Dec 2002, Jerry Ford wrote:
 >
 >
 >
 >>I can't get userdir to work on  a localhost install of Apache 1.3.27.
 >> I'm using the same directives in httpd.conf that are in my live server
 >>installation, where it does work. (Red Hat Linux 7.1 on both boxes.)
 >>
 >>
 >
 >...
 >
 >
 >
 >><Directory /home/*/public_html>
 >>    AllowOverride FileInfo AuthConfig Limit
 >>    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
 >>    <Limit GET POST OPTIONS PROPFIND>
 >>        Order allow,deny
 >>        Allow from all
 >>    </Limit>
 >>    <LimitExcept GET POST OPTIONS PROPFIND>
 >>        Order deny,allow
 >>        Deny from all
 >>    </LimitExcept>
 >></Directory>
 >>
 >>Works when I go to my home page on the live server; but when I try
 >>httpd://localhost/~jford on the localhost server, I get a Forbidden
 >>message---don't have permission to access /~jford on this server.
 >>
 >>
 >
 >What does the error log say? The Forbidden message is the message that
 >goes to the browser, but the real error message is in the error log.
 >
 >Make sure that the permissions on /home/*/public_html are such that the
 >'nobody' user can read and execute:
 >
 >chmod 755 /home
 >chmod 755 /home/*
 >chmod 755 /home/*/public_html
 >chmod 644 /home/*/public_html/*
 >
 >This will probably solve the problem, but check the error log anyway. It
 >could also be an Indexes problem.
 >
 >
 >



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] userdir doesn't work

Posted by Rich Bowen <rb...@rcbowen.com>.
On Tue, 31 Dec 2002, Jerry Ford wrote:

> I can't get userdir to work on  a localhost install of Apache 1.3.27.
>  I'm using the same directives in httpd.conf that are in my live server
> installation, where it does work. (Red Hat Linux 7.1 on both boxes.)

...

> <Directory /home/*/public_html>
>     AllowOverride FileInfo AuthConfig Limit
>     Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
>     <Limit GET POST OPTIONS PROPFIND>
>         Order allow,deny
>         Allow from all
>     </Limit>
>     <LimitExcept GET POST OPTIONS PROPFIND>
>         Order deny,allow
>         Deny from all
>     </LimitExcept>
> </Directory>
>
> Works when I go to my home page on the live server; but when I try
> httpd://localhost/~jford on the localhost server, I get a Forbidden
> message---don't have permission to access /~jford on this server.

What does the error log say? The Forbidden message is the message that
goes to the browser, but the real error message is in the error log.

Make sure that the permissions on /home/*/public_html are such that the
'nobody' user can read and execute:

chmod 755 /home
chmod 755 /home/*
chmod 755 /home/*/public_html
chmod 644 /home/*/public_html/*

This will probably solve the problem, but check the error log anyway. It
could also be an Indexes problem.

-- 
Oh I have slipped the surly bonds of earth
And danced the sky on laughter-silvered wings
 --High Flight (John Gillespie Magee)


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org