Forum Moderators: phranque

Message Too Old, No Replies

Name-Based Virtual Hosts

         

jjersey

6:18 pm on Jul 18, 2005 (gmt 0)

10+ Year Member



Hello All,

I am new to apache and the hosting world.

I have everything set up and ready to go (I think), but when I access the 2 sites I'm hosting the both show the same content which is incorrect. It always shows the content for the 1st virtual server.

<snip>

I am broadcasting on port 81

my config file is as such:

NameVirtualHost *

<VirtualHost *>
ServerName www.example.com
DocumentRoot /Library/WebServer/Documents/josh
</VirtualHost>

<VirtualHost *>
ServerName www.example.net
DocumentRoot /Library/WebServer/Documents/tiff
</VirtualHost>

Regardless of my virtual server combination, I cant get anything to work, and I'm sure I'm overlooking something simple.

Thanks for any help.

-j

(I'm sure this has been covered a million times, but the search function seems to be broken)

[edited by: jdMorgan at 7:45 pm (utc) on July 18, 2005]
[edit reason] Removed specifics. Please see TOS. [/edit]

ChadSEO

2:39 pm on Jul 19, 2005 (gmt 0)

10+ Year Member



I have never tried to setup VirtualHosts on an alternate port, so I don't know if this will fix it, but it's worth a shot:

NameVirtualHost *:81

<VirtualHost *:81>
ServerName www.example.com
DocumentRoot /Library/WebServer/Documents/josh
</VirtualHost>