Forum Moderators: phranque
This may not be the right place to post this, but it seemed the most relevant forum.
I have apache/php/mysql running on my laptop, and use it to code locally before uploading to the server.
I've edited my hosts file on Windows, so that I can connect to apache via [local.example.com...]
This works fine when I am connected to the web, but does not when I am offline! I've been frustrated by a dodgy net connection recently, and it's even more frustrating that I can't even make the most of working off-line.
Does anyone have any tips to get localhost working when off-line?
In your httpd.conf file the listen parameter should be set to 127.0.0.1 and then in your hosts file you should have entered
127.0.0.1 local.example.com
and that should be it.
William.
I've got this in my httpd.conf:
Listen 3000
Listen 127.0.0.1
NameVirtualHost 127.0.0.1
<VirtualHost 127.0.0.1>
ServerName localhost
DocumentRoot "D:/apachedocs/"
</VirtualHost>
And this in my hosts file:
127.0.0.1 localhost
Apart from the "listen" directive, it was all there before. Adding the listen directive (which I may not have done correctly) doesn't seem to have helped :-(
I've tried it with my firewall on and off, no effect.
Any other clues?