You are no doubt trying to add a vhost and you get the following error when attempting to affect changes by restarting the http daemon (httpd):

(EAI 2)Name or service not known: Could not resolve host name *.80 — ignoring!

Not to worry!

Add the following text to httpd.conf at the bottom (That’s at /etc/httpd/conf/httpd.conf):

NameVirtualHost 12.34.56.78:80

ServerAdmin [email protected]
DocumentRoot /var/www/html/the_path/
ServerName the_path.example.com
ErrorLog /logs/the_path.example.com-error_log
CustomLog /logs/the_path.example.com-access_log common

Now just restart the http daemon:

/etc/init.d/httpd restart

Make sure you replace the your details into the above snippet.


1 Comment

JE · March 1, 2013 at 00:09

This is horribly bad information.

The issue is caused by a syntax error in the VirtualHost *.80 is incorrect and cannot be resolved. The correct syntax is *:80. Colon not a period.

You can keep your NameVirtualHost *:80

and the VirtualHost will read

ServerAdmin [email protected]
DocumentRoot /var/www/html/the_path/
ServerName the_path.example.com
ErrorLog /logs/the_path.example.com-error_log
CustomLog /logs/the_path.example.com-access_log common

This will resolve and not trigger the error.

Leave a Reply

Your email address will not be published. Required fields are marked *