Apache cant see document root
I have set up apache on Centos 5.5 and am struggling with vhosts set up.
With the config I have set apache will correctly serve sites with a document root of /var/www/html /home/myuser/public_html but not /home/myuser/projects > ls -al shows public_html and projects as having identical permissions (755) Code:
drwxr-xr-x 6 myuser myuser 4096 Feb 8 10:05 . When I restart the httpd service I get: Code:
[root@localhost conf]# service httpd restart Code:
<VirtualHost *:80> Apache error log shows: Code:
[Wed Feb 09 11:22:24 2011] [error] [client 172.16.55.1] (13)Permission denied: access to / denied I am confused as to what is going on... Everything works if I set doc root and dir as /home/myuser/public_html, but not /home/myuser/projects |
hi,
As a trial jst give project folder full permission and try.then configure required permission. |
I have just set projects and the projects/index.html file to 777, but Apache is still reporting the same problem and I'm still getting a 403 in the browser. (I did restart the httpd service.)
|
Your Virtualhost tag does not seem to end anywhere. Just a typo or something?
|
Quote:
It is there, and I have added it to the op. |
hi,
403 seems something related to permission for webuser can u do one thing.jst backup the projects directory then take a copy of public_html ,rename it to projects and give a try. if its ok copy contents from backuped project folder. jst a suggestion. |
You can for time being turn off the SELinux and see if it works. Just check.
|
Quote:
I did Code:
[root@localhost myuser]# echo 0 >/selinux/enforce |
Quote:
So I re-enabled SELinux Backed up projects to projects.bac Moved public_html to projects - and now that one works. Apache restarts fine and serves the page. So I copied projects back to public_html - and now public_html doesnt work. It gives the same errors that projects used to. ?!! |
You will need to configure SELinux to allow apache to read from your home directory. If your system is not a production apache server, you can safely turn SELinux off. You can go to SELinux configuration tool from GUI and configure it to allow apache to read the directories if you want it running. Your take. I keep it off on non production machines.
|
Quote:
The solution was to do Code:
chmod 711 /home/myuser Thanks again guys. |
Great you got it working.
|
All times are GMT -5. The time now is 10:37 PM. |