Install Config Wiki

All about installing, configuring and troubleshooting

User Tools

Site Tools


ubuntu_apache2_service_reload_error

Fixed Error Reloading Apache2 Service - Could not reliably determine the server's fully qualified domain name using 127.0.1.1

This error occurred after I configured the first virtual host, enabled the site1.conf file from /sites-available/ directory over to the /sites-enabled/ directory using the a2ensite command, and then I tried to reload Apache2 using

sudo systemctl reload apache2

and received errors. I tried to restart apache2 using

sudo systemctl1 restart apache2

and I received an error.

I stopped the apache2 service, then tried to start apache2 using

sudo systemctl stop apache2

sudo systemctl start apache2

I received this error:

"AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message."

When I checked the status of apache2 service I received a similar error.

sudo systemctl status apache2

Here is one likely fix for these errors

cd /etc/apache2/

sudo vim apache2.conf

At the very bottom of the conf file, insert

ServerName localhost

Press Esc, Type :wq Enter in order to save and quit vim.

Now, restart Apache2

sudo systemctl restart apache2
ubuntu_apache2_service_reload_error.txt · Last modified: 2020/06/08 08:20 by wikiadmin