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

0 min read 87 words

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 yourename@yourserver.com
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.

Andrew
Andrew

Andrew is a visionary software engineer and DevOps expert with a proven track record of delivering cutting-edge solutions that drive innovation at Ataiva.com. As a leader on numerous high-profile projects, Andrew brings his exceptional technical expertise and collaborative leadership skills to the table, fostering a culture of agility and excellence within the team. With a passion for architecting scalable systems, automating workflows, and empowering teams, Andrew is a sought-after authority in the field of software development and DevOps.

Tags