Last Updated: February 25, 2016
·
1.08K
· alvaropg1980

Hostname resolution in Fedora 18

Perhaps Apache don't start given you an error like that:

[Thu Apr 11 10:51:39.937369 2013] [unique_id:alert] [pid 21134] (EAI 2)Name or service not known: AH01564: unable to find IPv4 address of "oripchan"
AH00016: Configuration Failed

This error is caused because your hostname can't be resolved in your DNS configurations. You can fix it with the nss-myhostname package.

First, install it:

$ sudo yum install nss-myhostname

Then, edit the /etc/nsswitch.conf file and append myhostname to the "hosts:" section:

...
hosts:   files dns myhostname
...

1 Response
Add your response

Important: Due a bug (https://bugzilla.redhat.com/show_bug.cgi?id=878409), when glibc package is updated, the nsswitch.conf file is overwritten. Execute: 'sudo yum reinstall nss-myhostname' until the bug is fixed.

over 1 year ago ·