Virtual Host Issue
am 11.10.2007 03:25:52 von esingley
OK, what stupid mistake am I making? I'm trying to setup a virtual
host on my local development machine. Nothing fancy. I've done it
dozens of times and have many virtual hosts running on my machine
right now. But for some reason this one won't work.
In my hosts file I have this line:
127.0.0.1 localdev.sBilling.com
In httpd.conf I have:
ServerName localdev.sBilling.com
DocumentRoot /Users/eric/Projects/sBilling/sBilling.com
I restart Apache, and go to http://localdev.sBilling.com, and...it
redirects to the GoDaddy parked domain page (the same page it goes to
when you type anything before the .sBilling.com).
The oddest part is that I can change the host name to ANYTHING else,
and the virtual host works fine. So, if in my config files I change
localdev.sBilling.com to just sBilling or to www.google.com, it
redirects to my local DocumentRoot folder just fine.
So what is it about my setup that's routing my xx.sBilling.com http
requests away from my local machine and to the GoDaddy domain??
I'm sure it's something stupid. Apologies in advance for that.
Thanks.
Re: Virtual Host Issue
am 11.10.2007 08:12:48 von David McKenzie
weeMighty wrote:
> OK, what stupid mistake am I making? I'm trying to setup a virtual
> host on my local development machine. Nothing fancy. I've done it
> dozens of times and have many virtual hosts running on my machine
> right now. But for some reason this one won't work.
>
> In my hosts file I have this line:
>
> 127.0.0.1 localdev.sBilling.com
>
> In httpd.conf I have:
>
>
> ServerName localdev.sBilling.com
> DocumentRoot /Users/eric/Projects/sBilling/sBilling.com
>
>
> I restart Apache, and go to http://localdev.sBilling.com, and...it
> redirects to the GoDaddy parked domain page (the same page it goes to
> when you type anything before the .sBilling.com).
>
> The oddest part is that I can change the host name to ANYTHING else,
> and the virtual host works fine. So, if in my config files I change
> localdev.sBilling.com to just sBilling or to www.google.com, it
> redirects to my local DocumentRoot folder just fine.
>
> So what is it about my setup that's routing my xx.sBilling.com http
> requests away from my local machine and to the GoDaddy domain??
>
> I'm sure it's something stupid. Apologies in advance for that.
>
> Thanks.
>
Do you have any other entries in your hosts file, possibly for
sBilling.com? Might be worth trying removing that and trying again...
Also, try using all lower-case. Unix is case sensitive but the interbuts
are not.
--
DM davidm@cia.com.au
'It would go against respecting principles and truth if you have to
respect and accept anything just because it is the other side's view.'
- Kim Jung Ill