This is what i have in my httpd.conf
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName mcmoddr.com
ServerAlias www.mcmoddr.com
DocumentRoot /home/mcmoddr/www/
ErrorLog /mcmoddr/logs/error.log
CustomLog /mcmoddr/logs/accesslog combined
</VirtualHost>
When visiting thwe site i get a 403 Forbidden error, The files are added with vsftpd and have the permissions drwxr-xr-x
You are using a stock install of CentOS, if that is correct please check that if SELinux is in Enforcing mode
if the result is "Enforcing"
temporally change it to permissive
and try again, you can also guide the condition of web content to the files in your home directory.
Disable SELinux or run in ROOT
Freaktor's answer of 'setenforce 0' did "work" for me (thanks!)
But to keep it working and re-enable SELinux, I needed to
...this gave my directory and all files and directories within it the security context of "httpd_t" which is a clunky way of saying SELinux let httpd read those files.
enabling selinux again was as simple as
You probably have a deny all somewhere in the global config. Try adding this to the vhost stanza:
Please add the below line in your existing code.
It should fix your issue.
you need to use the
<Directory>
container as it mentioned above .And then you need to check from your
DocumentRoot
path, Each directory must have read permission so the service user apache can access .you can check using
ls -ld