[thelist] Apache: Name base VirtualHost Hel[L]p?
Frank
lists at frankmarion.com
Wed Feb 18 00:54:40 CST 2004
Based on some earlier emails on thelist, I've started digging into (Win2k)
Apache (1.3x) with a certain degree of seriosity. I'm having an issue with
name based VirtualHost directives. For each of my client folders on my
machine, I have
domain_a.com, domain_b.com and so on...
I've set up my conf files as such
127.0.0.1 localhost
127.0.0.1 my_account_name_at.dnsalias.com
127.0.0.1 test.domain_A.com
127.0.0.1 test.domain_B.com
...
And my .conf file looks like this...
<VirtualHost *:80>
ServerName localhost
DocumentRoot D:\htdocs
</VirtualHost>
<VirtualHost test.domain_A.com:80>
ServerName test.domain_A.com
DocumentRoot D:\domain_A.com
</VirtualHost>
<VirtualHost test.domain_B.com:80>
ServerName test.domain_B.com
DocumentRoot D:\domain_B.com
</VirtualHost>
Whenever I restart Apache, whichever of the first domains I first test,
becomes the one that shows up regardless of which domain that I use. So if
I test "B", localhost, test.domain_a.com and test.domain_B.com all return
the contents of site "B"
Ideally what I want to do is to have it so that I punch in
http://test.site_A.com and get that domain, with the other correctly
accessing their respective domains. I've read
http://httpd.apache.org/docs/vhosts/
http://www.onlamp.com/pub/a/apache/2003/07/24/vhosts.html?page=1
and the appropriate chapters in O'Reilley's Apache: The Definitive Guide.
Either I'm out to lunch, not grokking the concept, or something's awry.
Suggestions anyone?
Thanks.
--
Frank Marion lists at frankmarion.com Keep the signal high.
More information about the thelist
mailing list