I just installed Apache 2.4 today, and I'm having some issues getting vhost configuration to work correctly. Below is the vhost conf
<VirtualHost *:80>
ServerAdmin
[email protected]
DocumentRoot /hosting/Client/site.com/www
ServerName site.com
ServerAlias www.site.com
<Directory "/hosting/Client/site.com/www">
Options +Indexes +FollowSymLinks
Order allow,deny
Allow from all
</Directory>
DirectoryIndex index.html
</VirtualHost>
There is an index.html file in /hosting/Client/site.com/www. When I go to the site, I receive a 403 forbidden error. The www-data group is the group on the www folder, which I've already given all permissions (r/w/x). I'm really at a loss as to why this is happening. Any thoughts?
If I remove the vhost and go straight to the IP address, I get the default, "It works!" page. So I know that it's working.
The error log says "client denied by server configuration".
apache2ctl -S dump:
nick@server:~$ apache2ctl -S
/usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted)
VirtualHost configuration:
*:80 is a NameVirtualHost
default server site.com (/etc/apache2/sites-enabled/site.com.conf:1)
port 80 namevhost site.com (/etc/apache2/sites-enabled/site.com.conf:1)
alias www.site.com
port 80 namevhost site.com (/etc/apache2/sites-enabled/site.com.conf:1)
alias www.site.com
ServerRoot: "/etc/apache2"
Main DocumentRoot: "/var/www"
Main ErrorLog: "/var/log/apache2/error.log"
Mutex watchdog-callback: using_defaults
Mutex default: dir="/var/lock/apache2" mechanism=fcntl
Mutex mpm-accept: using_defaults
PidFile: "/var/run/apache2.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
Define: ENALBLE_USR_LIB_CGI_BIN
User: name="www-data" id=33 not_used
Group: name="www-data" id=33 not_used
Ouput of namei -mo /hosting/Client/site/www/index.html
f: /hosting/Client/site.com/www/index.html
drwxr-xr-x root root /
drwxr-xr-x root root hosting
drwxr-xr-x root root Client
drwxr-xr-x nick www-data site.com
drwxr-xr-x nick www-data www
-rw-rwxr-x nick www-data index.html