Admin-Ahead Community

Linux => General Linux => Topic started by: joseletk on April 21, 2018, 11:25:29 am

Title: Apache won’t start – Name or service not known: mod_unique_id
Post by: joseletk on April 21, 2018, 11:25:29 am
Minor cause of frustration when you are installing Apache on a server that some one else has configured, is that if they have not setup the hosts file correctly apache will refuse to start.

The error is in /var/log/apache2/error_log and looks like below:

Code: [Select]
Name or service not known: mod_unique_id: unable to find IPv4 address of WebServer
This can be easily fixed by formatting your /etc/hosts file correctly as below (This example uses the hostname “WebServer” replace that with the hostname of your machine)

Code: [Select]
# /etc/hosts: Local Host Database

# IPv4 and IPv6 localhost aliases
127.0.0.1 WebServer.core.lan WebServer localhost
::1 WebServer.core.lan WebServer localhost

Thats it, apache will start as normal now
========================================================================