Hey All,
In my /etc/httpd/conf/httpd.conf when i set the documentroot to the folder: apache/www/
it goes: 403 Forbidden
When the folder is set to /var/www/html/ there's no problem...
- Do i set the permission to 700 (does it work with phpmyadmin?)
- Do i have to chmod chown ??
403 forbidden - Apache - Folder Permissions.
Re: 403 forbidden - Apache - Folder Permissions.
So you set the document root to
[code]
DocumentRoot "apache/www/"
[/code]
like that? Never tried anything like that but on my system the apache user's home directory is set as /var/www in /etc/passwd so what I set above would result in it trying to use a directory called /var/www/apache/www/ for the document root. That doesn't exist on my system so would probably result in a 403 like you see. If you created that directory as root then it would exist but it would be owned by root:root and would probably have no access for the apache user - another 403.
Did you really mean to set it to "apache/www/"?
[code]
DocumentRoot "apache/www/"
[/code]
like that? Never tried anything like that but on my system the apache user's home directory is set as /var/www in /etc/passwd so what I set above would result in it trying to use a directory called /var/www/apache/www/ for the document root. That doesn't exist on my system so would probably result in a 403 like you see. If you created that directory as root then it would exist but it would be owned by root:root and would probably have no access for the apache user - another 403.
Did you really mean to set it to "apache/www/"?
-
- Retired Moderator
- Posts: 18276
- Joined: 2006/12/13 20:15:34
- Location: Tidewater, Virginia, North America
- Contact:
403 forbidden - Apache - Folder Permissions.
Try it after doing[code]setenforce 0[/code]to temporarily put SELinux in Permissive mode. If that helps then the troubleshooter should give you clues about how to fix the issue.