MacOS – Apache “Client denied by server configuration”

apachemacos

When I am running my localsite/~user.name/ on OS X 10.7.5 it is loading the the correct page but in the log /var/log/apache2/error_log it's recording this message.

[Fri Mar 14 00:17:07 2014] [error] [client ::1] client denied by server configuration: /usr/~

Here is my httpd-vhost configuration for localhost

<VirtualHost *:80>
  ServerName localhost
  DocumentRoot "~/Sites"
  <Directory  "~/Sites">
    Options Indexes Multiviews
    AllowOverride All
    Order allow,deny
    Allow from all
  </Directory> 
</VirtualHost>

A check of apachectl -t shows no unexpected errors since I'm using localhost and don't need fully qualified DNS:

httpd: Could not reliably determine the server's fully qualified domain name, using MacBookPro.local for ServerName
Syntax OK

I am serving plain text files with basic html in them. What could be the reason for this?

Best Answer

access to the directory on the hard disk was denied by an Apache... that can be an explicit deny directive, or if the dir is outside of document root.

I suspect you don't have (and don't want!) /usr as part of your documentroot.