(This question got a little long, here's the straight skinny: I'm unable to browse using virtual host names on a development machine while disconnected from the internet.)
I'm using Apache (2.2.4) on Windows XP for offline development. To make it as seamless as possible I use a Virtual host for each site I'm developing. It all works great - but only if I'm connected online. Once I move away from an Internet connection - such as at a client meeting for a demo (embarassing) or to a cabin by the lake (a blessing) - I can't use the virtual name to reach the site.
Here's how I'm set up.
In my apache config I have (for example):
NameVirtualHost *:80
<VirtualHost *:80>
ServerName notquiteacashcow.local
DocumentRoot "K:\WebDev\notquiteacashcow.com"
</VirtualHost>
In Windows' hosts file I have the line:
127.0.0.1 notquiteacashcow.local
As I said, everything works when I'm connected, but with the router turned off/cable disconnected/no wireless available I get "Server Not Found" errors in the browser and cannot ping the virtual name.
I can still browse to and ping either "localhost" or 127.0.0.1 and get to Apache's htdocs directory, but pinging notquiteacashcow.local gives, "Ping request could not find host notquiteacashcow.local. Please check the name and try a
gain."
I realize that the ping results show that this is not a problem with Apache, but I'm hoping that someone out there has also wanted to do some truly offline development and was able to solve this issue. During my Google research I've seen this question asked in various forums but it never seems to get any responses, let alone an answer.
A nudge (shove?) toward a more appropriate place to ask this question will be nearly as appreciated as a solution...
I'm using Apache (2.2.4) on Windows XP for offline development. To make it as seamless as possible I use a Virtual host for each site I'm developing. It all works great - but only if I'm connected online. Once I move away from an Internet connection - such as at a client meeting for a demo (embarassing) or to a cabin by the lake (a blessing) - I can't use the virtual name to reach the site.
Here's how I'm set up.
In my apache config I have (for example):
NameVirtualHost *:80
<VirtualHost *:80>
ServerName notquiteacashcow.local
DocumentRoot "K:\WebDev\notquiteacashcow.com"
</VirtualHost>
In Windows' hosts file I have the line:
127.0.0.1 notquiteacashcow.local
As I said, everything works when I'm connected, but with the router turned off/cable disconnected/no wireless available I get "Server Not Found" errors in the browser and cannot ping the virtual name.
I can still browse to and ping either "localhost" or 127.0.0.1 and get to Apache's htdocs directory, but pinging notquiteacashcow.local gives, "Ping request could not find host notquiteacashcow.local. Please check the name and try a
gain."
I realize that the ping results show that this is not a problem with Apache, but I'm hoping that someone out there has also wanted to do some truly offline development and was able to solve this issue. During my Google research I've seen this question asked in various forums but it never seems to get any responses, let alone an answer.
A nudge (shove?) toward a more appropriate place to ask this question will be nearly as appreciated as a solution...