ScaryBinary
11-07-2004, 06:25 PM
I'm running the Apache webserver, and am attempting to set up the virtual hosting to run multiple sites on one IP address. I've skimmed through the Apache documentation, and have (I think) set up my conf file properly...also looked at the TZO (http://www.tzo.com/MainPageSupport/HowToPage/HowToApacheServerMultipleDomains.html) site (I use TZO since I don't have a static IP) and I think I have everything OK.
The problem is, I only have one name registered with TZO, and I'd like to make sure I have the virtual hosting set up properly before I pay for another name...
So, my conf file looks something like this (as far as the VirtualHost part of it goes):
<VirtualHost 192.168.1.5:80>
ServerAdmin webmaster@2.tzo.com
DocumentRoot "/home/webs/Apache/2"
ServerName 2.tzo.com
</VirtualHost>
<VirtualHost 192.168.1.5:80>
ServerAdmin webmaster@3.tzo.com
DocumentRoot "/home/webs/Apache/3"
ServerName 3.tzo.com
</VirtualHost>
...and I already have the 2.tzo.com name registered and everything. How can I fake out my browser/Apache to believe I'm asking it to serve the 3.tzo.com site if I haven't actually registered it?
Tried tweaking my HOSTS file to translate 3.tzo.com to the 192 address, but it didn't work (and I wasn't sure if my approach was way off or if my VirtualHost stuff wasn't set up right). At any rate, I can get to the registered 2.tzo.com, so it seems my VirtualHost stuff might be OK.
Any thoughts?
The problem is, I only have one name registered with TZO, and I'd like to make sure I have the virtual hosting set up properly before I pay for another name...
So, my conf file looks something like this (as far as the VirtualHost part of it goes):
<VirtualHost 192.168.1.5:80>
ServerAdmin webmaster@2.tzo.com
DocumentRoot "/home/webs/Apache/2"
ServerName 2.tzo.com
</VirtualHost>
<VirtualHost 192.168.1.5:80>
ServerAdmin webmaster@3.tzo.com
DocumentRoot "/home/webs/Apache/3"
ServerName 3.tzo.com
</VirtualHost>
...and I already have the 2.tzo.com name registered and everything. How can I fake out my browser/Apache to believe I'm asking it to serve the 3.tzo.com site if I haven't actually registered it?
Tried tweaking my HOSTS file to translate 3.tzo.com to the 192 address, but it didn't work (and I wasn't sure if my approach was way off or if my VirtualHost stuff wasn't set up right). At any rate, I can get to the registered 2.tzo.com, so it seems my VirtualHost stuff might be OK.
Any thoughts?