httpd.conf UserDir setting not working

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
mmccaws
Posts: 2
Joined: 2007/04/15 00:14:25

httpd.conf UserDir setting not working

Post by mmccaws » 2007/04/15 16:53:07

this is the first time I've installed CentOS, much less CentOS 5. Could you help me with the finer setting issues with my apache install? :^)

I installed Apache2 from Cent0s 5 disks downloaded recently. I was trying to configure UserDir to work locally to my user directory. Below is the configuration for that aspect. Please review and tell me if you need more information to help resolve the problem


#
# 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, use this directive instead of "UserDir disable":
#
UserDir public_html



directory settings:
from /home
drws--x--x 18 mcw mcw 4096 Apr 15 09:36 mcw
from /mcw
drwsrwxr-x 2 mcw mcw 4096 Apr 14 14:28 public_html
from /public_html

-rwxr-xr-x 1 root root 5053 Apr 14 14:19 index.html

This "http://localhost/~mcw/sam.html" gives :-{

Forbidden

You don't have permission to access /~mcw/sam.html on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Thanks ahead

Mike

mmccaws
Posts: 2
Joined: 2007/04/15 00:14:25

Re: httpd.conf UserDir setting not working

Post by mmccaws » 2007/04/17 18:24:10

I've had no replies. Is there a better forum to post this question at?

Mike

amd64bit
Posts: 1
Joined: 2007/04/19 11:09:03

Re: httpd.conf UserDir setting not working

Post by amd64bit » 2007/04/19 11:34:35

[quote]
mmccaws wrote:
this is the first time I've installed CentOS, much less CentOS 5. Could you help me with the finer setting issues with my apache install? :^)

I installed Apache2 from Cent0s 5 disks downloaded recently. I was trying to configure UserDir to work locally to my user directory. Below is the configuration for that aspect. Please review and tell me if you need more information to help resolve the problem


#
# 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, use this directive instead of "UserDir disable":
#
UserDir public_html



directory settings:
from /home
drws--x--x 18 mcw mcw 4096 Apr 15 09:36 mcw
from /mcw
drwsrwxr-x 2 mcw mcw 4096 Apr 14 14:28 public_html
from /public_html

-rwxr-xr-x 1 root root 5053 Apr 14 14:19 index.html

This "http://localhost/~mcw/sam.html" gives :-{

Forbidden

You don't have permission to access /~mcw/sam.html on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Thanks ahead

Mike[/quote]

Easy

Frist you must uncomment these in httpd.conf (from )

# Control access to UserDir directories. The following is an example
# for a site where these directories are restricted to read-only.
#

AllowOverride FileInfo AuthConfig Limit
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec

Order allow,deny
Allow from all


Order deny,allow
Deny from all



Second you put index.html in public_html that is corrected but the file you call is sam.html that is not existed.
more questions are welcome.



---------------------------------------------------------------------------------------

wshawn
Posts: 7
Joined: 2007/03/30 02:26:38

httpd.conf UserDir setting not working

Post by wshawn » 2007/04/23 14:07:19

You will also need to look at SELinux as it excludes http access to users directories.

arrrghnold
Posts: 1
Joined: 2007/04/26 21:16:53
Contact:

Re: httpd.conf UserDir setting not working

Post by arrrghnold » 2007/04/26 21:19:52

Were you able to resolve this? I am having the same problems and the suggested fix did not alleviate the 403 Forbidden error.

Post Reply

Return to “CentOS 5 - Server Support”