Question

Restarting Apache Server - Ubuntu

I tried to restart

It says "Could not reliably determine the server’s fully qualified domain name. Using 127.0.0.1. Set the ‘Servername’ directive globally to suppress this message ".

I haven’t pointed any domain to my IP yet. I am trying to restart apache is because of minor changes in php.ini file.

How can I restart apache2 successfully ? or How to make php.ini changes to work.

Show comments

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.

Just had the same issue, resolved it by following sierracircle’s instructions except that I edited this file:

sudo nano /etc/apache2/apache2.conf

To fix that problem, you need to create an httpd.conf file.

From the terminal: sudo nano /etc/apache2/httpd.conf the file will be blank…add the following line:

ServerName localhost

Save the file and exit nano.(I think it is crtrl X in nano)

Finally restart the server.: sudo service apache2 restart

when i run sudo service apache2 restart i got below erroe

Job for apache2.service failed because the control process exited with error code. See “systemctl status apache2.service” and “journalctl -xe” for details.