[thelist] Apache: Name base VirtualHost Hel[L]p?
Frank
lists at frankmarion.com
Wed Feb 18 04:01:56 CST 2004
At 04:23 AM 2004-02-18, you wrote:
>"\" is not a correct folder separator in an apache conf.
>
>Try replacing it with "/" and tell us if it's better.
>
>(educated guess: "\" is not understood at all, or maybe as an escape
>character, thus your virtual hosts overlap...)
Thanks. Tried it. No go. Let me re-cover the basics, this time with real
info, maybe I've missed something.
The current set up points only to the root
DIRECTORY LAYOUT
D:/htdocs <- zeph.dnsalias.com/ (localhost)
D:/htdocs/ninaspencer.com/
D:/htdocs/tidysflowers.com/
HOSTS FILE
127.0.0.1 localhost
127.0.0.1 zeph.dnsalias.com (Free DNS redirection service to my IP)
127.0.0.1 test.ninaspencer.com
127.0.0.1 test.tidysflowers.com
CONF FILE
NameVirtualHost *:80
<VirtualHost *:80>
ServerName zeph.dnsalias.com
DocumentRoot D:/htdocs
</VirtualHost>
<VirtualHost *:80>
ServerName test.ninaspencer.com
DocumentRoot D:/htdocs/ninaspencer.com
</VirtualHost>
<VirtualHost *:80>
ServerName test.tidysflowers.com
DocumentRoot D:/htdocs/tidysflowers.com
</VirtualHost>
If I use the following variables in my Coldfusion template, I get the
following consistent results
#cgi.server_name# <- correct name ie "test.domain.com" or
"zeph.dnsalias.com". This is always reflected correctly.
HERE'S WHERE IT SCREWS UP.
Assume that every test below is immediately after an Apache reboot.
If I first access zeph.dnsalias.com (the root), all subsequent access of
these domains will show GetCurrentTemplatePath() as "D:\htdocs\index.cfm "
(the root of zeph.dnsalias.com)
If I first access test.tidysflowers.com, all subsequent access of these
domains will show GetCurrentTemplatePath() as
"D:\htdocs\tidysflowers.com\index.cfm"
If I first access test.ninaspencer.com, all subsequent access of these
domains will show GetCurrentTemplatePath() as
"D:\htdocs\ninaspencer.com\index.cfm "
UNLESS
I access test.tidysflowers.com TWICE , then all subsequent access of these
domains will show GetCurrentTemplatePath() as
"D:\htdocs\tidysflowers.com\index.cfm"
This is as consistent, as it is baffling to me.
At this point (with these settings), there is NO Apache error when I
re-launch it.
Let me know if I've missed an important pieces of data. Win2k, CF MX,
Apache 1.36
--
Frank Marion lists at frankmarion.com Keep the signal high.
More information about the thelist
mailing list