Question

Problem restarting Apache

I have just installed lamp stack on centos, according to the tutorials on DO. Now when I give the command "sudo service httpd restart " it gives the following message " Stopping httpd: [ OK ] Starting httpd: httpd: apr_sockaddr_info_get() failed for cent httpd: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1 for ServerName "

BUT when i go to the ip address or the domainname.com it show that apache is installed and even the info.php file which i have created for testing purpose is also being showed in both the IP and domainname.com

Can someone please explain me this message. I am using linux for the first time.

Thanks for the help in advance.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

@hypertextsol, <br> <br>Do as @Alex recommended; then, make sure your hostname is correctly listed in <strong>/etc/hostname</strong>.

You either need to configure DNS correctly, or put your hostname into /etc/hosts. It’s not a fatal error, but it does betray poor attention to configuration details. <br> <br>

This is the content in /etc/hosts <br>127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 <br>::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 <br> <br>