Windows – XAMPP on Windows – Permission Problems

apache-2.2windowswindows-vistaxampp

Trying to set up Apache/PHP/MySQL development on my Vista laptop, so I thought XAMPP would be a quick and easy solution.

I have this vhost:

<VirtualHost *:80>
    ServerAdmin webmaster@example.com
    DocumentRoot C:\Development\xxx-projects\xxxx\web
    ServerName miai.local
</VirtualHost>

in httpd.conf I am including it

Include conf/extra/httpd-vhosts.conf

but I'm always getting this error when I visit miai.local:

Access forbidden!

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

If I set up the virtualhost to read from C:\xampp\htdocs\xxxx\web instead of my C:\Development\xxx-projects\xxxx\web folder, it works fine.

It's like some kind of permission problem … only on Windows. And I've no idea how ownership works on windows!

Any ideas?

Best Answer

Ah, the answer was my virtualhost was bad. Needed a directory, uh ... directive..:

<VirtualHost *:80>
    ServerAdmin webmaster@example.com
    DocumentRoot C:\Development\xxx-projects\xxxx\web
    ServerName miai.local
    <Directory C:\Development\xxx-projects\xxxx\web>
        Order Deny,Allow
        Allow from 127.0.0.1
    </Directory>
</VirtualHost>