Forum Moderators: phranque

Message Too Old, No Replies

Serving virtualhosts

can't seem to do it

         

wheel

2:24 pm on Sep 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm trying to add a subdomain to a webserver that's been running just one domain so far. Not having any luck.

I added a block into my Vhosts.conf file that points to that directory containing the files for the subdomain. Yet whenever I access the subdomain, I get served the main domain instead of the subdomain.

I figured maybe it was serving the default domain - first one in the Vhosts list - but I switched the subdomain to be first in the Vhosts.conf file, restarted and it didn't change anything. Almost like it's not reading the Vhosts.conf file - but httpd.conf has a line that says to include that file.

I suspect a simple config change, but having no luck reading through httpd.conf. Any suggestions?

Romeo

2:35 pm on Sep 24, 2007 (gmt 0)

10+ Year Member



Have you seen the examples here:
[httpd.apache.org...]

Does the vhosts file get references from your main config file, and have you switched on NameVirtual hosting:

Listen 80
NameVirtualHost *:80

<VirtualHost *:80>
# etc ...

Kind regards,
R.