[olug] Apache problems between CentOS 3.x and 4.x

Mario Steele eumario at trilake.net
Wed Jul 20 00:52:34 UTC 2005


Michael Peterson wrote:

>Has anyone figured out the fix to be able to allow browsers to view pages in
>user directories with CentOS 4.x?
>
> 
>
>I get this response.
>
> 
>
>
>Forbidden
>
>
>You don't have permission to access /~<username>/ on this server.
>
>Additionally, a 403 Forbidden error was encountered while trying to use an
>ErrorDocument to handle the request.
>
>I have the permissions on the username in /home and the public_html set
>properly.
>
> 
>
>I have searched the apache documentation online.
>
> 
>
>I have compared the httpd.conf files between 3.x and 4.x.
>
> 
>
>I can change the 403 message sent by apache but cannot get it to show files
>in a user directory even by entering a specific file name such as
>
> 
>
>http://<ip>/~<user>/index.html
>
> 
>
>The apache releases that work are 2.0.48 and 2.0.46.
>
>The apache release that has the issue is 2.0.52.
>
> 
>
>Any help would be appreciated.
>  
>
I'm running Apache 2.0.52, but this is often a point that is overlooked. 
(I've done it myself many diffrent times) Take a look at your 
httpd.conf, and check this section:

<IfModule mod_userdir.c>
#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
UserDir disable

#
# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disable" line above, and uncomment
# the following line instead:
#
#UserDir public_html

</IfModule>

Make sure you Comment out UserDir disable. You may want to sift through 
your httpd configuration files, since most distros have gone into a 
favor for multiple files, instead of a single file. This may very well 
explain the problem. If anywhere UserDir disable is declared, it will 
disable user directories for HTTP All together, even if you declare 
UserDir public_html (Or whatever you choose) before the disable.

-- 
Mario Steele
http://www.trilake.net/
Trilake Computer Services (Web Hosting, Custom Building, PC Support, Winblows Tech, PC Upgrading)

http://enchantedblade.trilake.net/
The insanity of the world, wrapped in a nice little HTML Document.  Welcome to my world now.




More information about the OLUG mailing list