954,242 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

cannot access /~user/public_html

hi...I am running rhel5.4.

I have enable UserDir in apache and get the forbidden error while trying to access http://localhost/~lanor

I have set set permission for user Lanor 711 for home dir "lanor" and 755 for "public_html"

Is it that I have to set the above permission for the user apache?.

Even if I set permission 777 for both the directories, I still get the forbidden error message.

Help Please!!

Lanor
Newbie Poster
12 posts since Oct 2010
Reputation Points: 3
Solved Threads: 1
 

can you post the virtual host from your conf file?

kylegetson
Junior Poster in Training
89 posts since Sep 2009
Reputation Points: 26
Solved Threads: 12
 

I have tried the same in Redhat 9 in a virtual environment @ my university lab and it works fine, I am able to access it from actual hosts as well....

I am just trying it out on my laptop with rhel5.4

httpd.conf(virtual host section)



ServerName ghost

DirectoryIndex index.html index.htm index.shtml

Lanor
Newbie Poster
12 posts since Oct 2010
Reputation Points: 3
Solved Threads: 1
 

doc root missing?

kylegetson
Junior Poster in Training
89 posts since Sep 2009
Reputation Points: 26
Solved Threads: 12
 

public_html exists in home directory...I just don't get why permission is denied.

Like I said...Works for Redhat 9 but does not for rhel5.4..

Anyway..I give up...am thinking of doing a fresh installation....

Thanx guys for your replies....

Lanor
Newbie Poster
12 posts since Oct 2010
Reputation Points: 3
Solved Threads: 1
 

You have to add the Directive DocumentRoot inside your virtual host tag along with other directives

DocumentRoot /home//public_html


then # /etc/init.d/httpd restart

jino
Junior Poster
117 posts since Feb 2008
Reputation Points: 10
Solved Threads: 10
 

Thanks alot...you solved my problem.
I searched days for answers and u just solved it.

thanks

You have to add the Directive DocumentRoot inside your virtual host tag along with other directives

DocumentRoot /home//public_html

then # /etc/init.d/httpd restart

Lanor
Newbie Poster
12 posts since Oct 2010
Reputation Points: 3
Solved Threads: 1
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: