Error 403 with Virtual Host [SOLVED]
Posted: 05. March 2013 01:33
Hello,
I'm trying to set up a virtual host on my machine but when I go to localhost I get Error 403.
It seems to be a problem with the httpd-vhosts.conf file - when I comment out my code I can see my existing projects (not on virtual host) but if I uncomment my code I get the Error 403 message.
I will try to explain my set-up.
Xampp is installed in: C:\Program Files\Programs\xampp
httpd-vhosts.conf: C:\Program Files\Programs\xampp\apache\conf\extra
httpd.conf: C:\Program Files\Programs\xampp\apache\conf
hosts: C:\Windows\System32\Drivers\etc
hosts
httpd.vhosts.conf
Same as default except I added the following at the end
Now when I enter either zend.localhost or localhost in my browser I get the Error 403 message
I'm out of my depth here - any help would be appreciated.
Jubilee
I'm trying to set up a virtual host on my machine but when I go to localhost I get Error 403.
Access forbidden!
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
It seems to be a problem with the httpd-vhosts.conf file - when I comment out my code I can see my existing projects (not on virtual host) but if I uncomment my code I get the Error 403 message.
I will try to explain my set-up.
Xampp is installed in: C:\Program Files\Programs\xampp
httpd-vhosts.conf: C:\Program Files\Programs\xampp\apache\conf\extra
httpd.conf: C:\Program Files\Programs\xampp\apache\conf
hosts: C:\Windows\System32\Drivers\etc
hosts
- Code: Select all
#I REMOVED COMMENTED CODE FOR READABILITY
#THE LINE BELOW IS ALL THAT IS DIFFERENT FROM THE DEFAULT FILE
127.0.0.1 zend.localhost
httpd.vhosts.conf
Same as default except I added the following at the end
- Code: Select all
<VirtualHost *:80>
##ServerAdmin postmaster@dummy-host2.localhost
DocumentRoot "C:/Users/Jubilee/Documents/NetBeansProjects/proj01/public"
ServerName zend.localhost
##ServerAlias www.IncubatorDoctrineZF.localhost
##ErrorLog "logs/IncubatorDoctrineZF.localhost-error.log"
#CustomLog "logs/IncubatorDoctrineZF.localhost-access.log" combined
<Directory "C:/Users/Jubilee/Documents/NetBeansProjects/proj01/public">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>
Now when I enter either zend.localhost or localhost in my browser I get the Error 403 message
I'm out of my depth here - any help would be appreciated.
Jubilee