Forum Moderators: phranque

Message Too Old, No Replies

Apache Subdomains Not Working

Apache Subdomains Not Working

         

Aries1385

4:15 am on Jun 23, 2008 (gmt 0)

10+ Year Member


Hi,

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

Aries1385

4:16 am on Jun 23, 2008 (gmt 0)

10+ Year Member


Here again are the subdomains. there are errors above on the names.

<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>

jdMorgan

6:38 pm on Jun 24, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What is the source of DNS on your LAN for your subdomains? Have you added each subdomain to the "hosts" file on each client machine on your LAN?

Jim