You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by The Fueley <Th...@satx.rr.com> on 2004/01/22 00:07:33 UTC

[users@httpd] "Forbidden" Error on UserDirs

I'm having sorta the same prob that z-lite is having with displaying a
page. I installed apache2.0.48 under gentoo. I kept the default
/var/www/localhost/htdocs as the document root. Thats fine for me. What
i want to do is enable the personal user web pages. eg.
http://webserver/~thefueley/index.html 
i have this in my apache2.conf.

LoadModule userdir_module                modules/mod_userdir.so

I also have this in my commonapache2.conf

<IfModule mod_userdir.c>
    UserDir public_html
    UserDir enabled thefueley
</IfModule>
 
<Directory public_html>
Allow from all
AllowOverride AuthConfig
Options +Indexes
</Directory>

I also have the public_html dir under my home dir. 
The .htaccess file in /home/thefueley/public_html is with permissions
755 and owned by root. My error_log only shows that i have access denied
to http://webserver/~thefueley/ and
http://weberver/~thefueley/index.html
Yes i do have the index.html file in public_html and i have restarted
apache2 when making changes. The default webpage comes up fine
everytime, as in http://weberver. I get the default.."Congratulations
Apache install was successful" I'm getting frustrated here, anyone know
what I'm missing? I can post more of my configs if necessary. Thanks for
your time all. 
-- 
The Fueley
54 68 65 20 46 75 65 6C 65 79

Re: [users@httpd] "Forbidden" Error on UserDirs

Posted by Jez Hancock <je...@munk.nu>.
On Wed, Jan 21, 2004 at 05:07:33PM -0600, The Fueley wrote:
> I'm having sorta the same prob that z-lite is having with displaying a
> page. I installed apache2.0.48 under gentoo. I kept the default
> /var/www/localhost/htdocs as the document root. Thats fine for me. What
> i want to do is enable the personal user web pages. eg.
> http://webserver/~thefueley/index.html 
> i have this in my apache2.conf.
> 
> LoadModule userdir_module                modules/mod_userdir.so
> 
> I also have this in my commonapache2.conf
> 
> <IfModule mod_userdir.c>
>     UserDir public_html
>     UserDir enabled thefueley
> </IfModule>
>  

This should be an absolute path:
> <Directory public_html>
> Allow from all
> AllowOverride AuthConfig
> Options +Indexes
> </Directory>
- if you're wanting this to apply to all /home/*/public_html directories,
you probably want something like this:

<Directory /home/*/public_html>
	Allow from all
	AllowOverride AuthConfig
	Options +Indexes
</Directory>

Although given your UserDir directive instructing apache to only allow
the user thefueley to have a UserDir account, you perhaps only want it 
to apply to thefueley's public_html:

<Directory /home/thefueley/public_html>
	Allow from all
	AllowOverride AuthConfig
	Options +Indexes
</Directory>

You may still have problems with this still though if the perms on
/home/thefueley/public_html aren't sufficient to allow the apache user
read access to files under that directory - ensure the apache user does
have these perms.

-- 
Jez Hancock
 - System Administrator / PHP Developer

http://munk.nu/
http://jez.hancock-family.com/  - Another FreeBSD Diary
http://ipfwstats.sf.net/        - ipfw peruser traffic logging

---------------------------------------------------------------------
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