I am trying to configure my local server to host a website of mine responding to an existent domain name.
Say the domain name is
If I DO NOT configure Apache
"extra/httpd-vhosts.conf", then everything works fine.
I have correctly configure the DNS, so I see the root of my local web server.
If I DO CONFIGURE Apache
"extra/httpd-vhosts.conf", well...all I get is Forbidden You do not have permission to acces / on this server.
Now...I have followed many guides and solutions, but I cannot fix it.
What am I missing?
This is my
<Directory C:/vhosts/> Require all granted </Directory> NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "C:/www/htdocs/" ServerAdmin admin@localhost ServerName localhost <Directory "C:/www/htdocs/"> Require all granted </Directory> </VirtualHost> <VirtualHost *:80> DocumentRoot "C:/vhosts/www.mywebsite.com/www/" ServerAdmin admin@localhost ServerName www.mywebsite.com ServerAlias mywebsite.com <Directory "C:/vhosts/www.mywebsite.com/www/"> Require all granted </Directory> </VirtualHost>
I have also set the Windows "hosts" file, by inserting
Why getting always error 403?
Again, my enviroment is made of:
- Windows Server 2008 R2
- Apache 2.4