# Can Apache run offline?



## don2357 (Jun 12, 2011)

Hi,

Total beginner here. As the title says - can Apache run offline? 

I don't yet have a domain name, or permanent access to the internet, but when I am connected (as I was to download and install apache22 and PHP) I can use http://127.0.0.1 and can view the test.php file. But when I am not connected I cannot use http://127.0.0.1 and httpd does not seem to be starting at all. Why is that?

I would have thought it would still work when disconnected. I am hoping there is something I have overlooked... I hope it is not the case that Apache needs to be connected to start. Any help would be appreciated.

The message from httpd-error.log gives:


```
[alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 

address of "leonardo.com"
Configuration Failed
```


----------



## wblock@ (Jun 12, 2011)

DNS.  It's always DNS.  The message says your machine is called "leonardo.com", but there's no DNS to get an IP address for it.  So add it to /etc/hosts.


----------



## don2357 (Jun 12, 2011)

That worked. Thanks very much!


----------



## gordon@ (Jun 13, 2011)

You can also remove mod_unique_id from the config. Odds are you don't need it.


----------

