I'm using XAMPP on my mac to power some virtual hosts for offline web dev.

Every file I try to access says the same error:

Access forbidden!

You don't have permission to access the requested object. It is either read-protected or not readable by the server.

If you think this is a server error, please contact the webmaster. Error 403 seo-reports.local Sun Sep 4 19:30:10 2011 Apache/2.2.14 (Unix) DAV/2 mod_ssl/2.2.14 OpenSSL/0.9.8l PHP/5.3.1 mod_perl/2.0.4 Perl/v5.10.1

The error log reports the following for every file:

[Sun Sep 04 19:26:43 2011] [error] [client 127.0.0.1] (13)Permission denied: access to /apply.php denied 
[Sun Sep 04 19:28:57 2011] [error] [client 127.0.0.1] (13)Permission denied: access to /img.png denied
[Sun Sep 04 19:29:50 2011] [error] [client 127.0.0.1] (13)Permission denied: access to /index.php denied 
[Sun Sep 04 19:30:10 2011] [error] [client 127.0.0.1] (13)Permission denied: access to /index.html denied

Please help!

More info can be provided if necessary.

Edit: httpd-vhosts.conf:

# 
# Use name-based virtual hosting.
# 
NameVirtualHost *:80



# localhost [must be included as the default named server]
<VirtualHost *:80>
    ServerName localhost
    DocumentRoot "/Applications/XAMPP/htdocs"
    <Directory "/Applications/XAMPP/htdocs">
        Options Indexes FollowSymLinks Includes execCGI
        AllowOverride None
        Order Allow,Deny
        Allow From All
    </Directory>
</VirtualHost>

# seo-reports.local
<VirtualHost *:80>
    ServerName seo-reports.local
        ServerAdmin alexandercoady@me.com
    DocumentRoot "/Users/Alex/Documents/Software Development/Web/SEO Reports"
    <Directory "/Users/Alex/Documents/Software Development/Web/SEO Reports">
        Options Indexes FollowSymLinks Includes execCGI
        AllowOverride None
        Order Allow,Deny
        Allow From All
    </Directory>
        ErrorLog "/Users/Alex/Documents/Software Development/Web/SEO Reports/error.log"
        CustomLog "/Users/Alex/Documents/Software Development/Web/SEO Reports/access.log" common
</VirtualHost>
link|improve this question
Well, how about adding the virtual host file in question as well as .htaccess files if there are any. Oh, and maybe check the permissions on the folders and all subfolders. – Boo Sep 4 '11 at 19:30
@Boo I've added the virtual hosts file contents, and all the permissions for files and folders are in order.. – Alex coady Sep 4 '11 at 19:42
Are you remembering to restart Apache after making configuration changes? Did you remember to uncomment the httpd.conf directive to include the vhosts config file? – Miles Erickson Sep 5 '11 at 17:09
Also, why are you using XAMPP on a Mac? MacOS X already includes Apache. – Miles Erickson Sep 5 '11 at 17:09
PHP, MySQL.. Seems like the thing to do? I'm no server expert, I'm a decent programmer so when it comes to the servers I just want them to work and never need to worry about them – Alex coady Sep 7 '11 at 10:45
feedback

1 Answer

Make them follow this:

<VirtualHost *:80>
    ServerName domain.com
    DocumentRoot "/Applications/XAMPP/htdocs"
    <Directory "/Applications/XAMPP/htdocs">
        Options Indexes FollowSymLinks Includes execCGI
        AllowOverride All
        Order Allow,Deny
        Allow From All
    </Directory>
</VirtualHost>

Try the AllowOverride All (security flaw, but this is for troubleshooting).

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.