Forum Moderators: phranque
I have set up a private test server in my Windows PC and used Apache as the test server. I have successfully intalled the program and created a test site. The localhost site that I created is wroking and I am now setting up subdomains.
I have already enabled the virtual host include in the httpd.conf which is this one.
Include conf/extra/httpd-vhosts.conf
But none of my subdomains are working.
---------
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host.localhost
DocumentRoot subdomains/test2
ServerName test2.localhost
ServerAlias www.madrid.localhost
ErrorLog "logs/madrid.localhost-error.log"
CustomLog "logs/madrid.localhost-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.localhost
DocumentRoot docs/dummy-host2.localhost
ServerName dummy-host2.localhost
ErrorLog "logs/dummy-host2.localhost-error.log"
CustomLog "logs/dummy-host2.localhost-access.log" common
</VirtualHost>
----------
since I have loaded the virtual host include now the localhost is not working but I have added the localhost in the httpd-vhosts.conf
-----------
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot htdocs
ServerName localhost
ServerAlias localhost
ErrorLog "logs/error.log"
CustomLog "logs/access.log" common
</VirtualHost>
-----------
and local host is working.
However still the subdomain virtual host are not working properly and I get the error "the page cannot be displayed" in my browser.
I looked at the log file and the error was.
[Mon Jun 23 09:38:48 2008] [error] [client 127.0.0.1] client denied by server configuration: D:/apache/subdomains/test2/
Can someone help me on this?
Thanks,
Aries
<VirtualHost *:80>
ServerAdmin webmaster@test2.localhost
DocumentRoot subdomains/test2
ServerName test2.localhost
ServerAlias www.test2.localhost
ErrorLog "logs/test2.localhost-error.log"
CustomLog "logs/test2.localhost-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.localhost
DocumentRoot docs/dummy-host2.localhost
ServerName dummy-host2.localhost
ErrorLog "logs/dummy-host2.localhost-error.log"
CustomLog "logs/dummy-host2.localhost-access.log" common
</VirtualHost>