How to Restart Apache in Ubuntu Server 16.04

In this tutorial you are going to learn how to Restart Apache Web Server in Ubuntu Server 16.04.

To Restart Ubuntu Apache2 Web Server you can use systemctl command or apache2ctl command.

Restart Apache2 in Ubuntu using systemctl command

To restart Apache Server in Ubuntu, restart the apache2 service using systemctl command.

sudo systemctl restart apache2.service
How to Restart Apache in Ubuntu Server 16.04

The reload option of the systemctl command will reload the apache configuration file, without restarting the entire HTTP Process.

sudo systemctl reload apache2.service

Restart Apache Web Server using apache2ctl command

The apache2ctl command is a very simple command use to manage the Apache2 server on Ubuntu 16.04.

sudo apache2ctl restart

This will restart apache web server on Ubuntu Server 16.04.

Apache Graceful Restart in Ubuntu Server 16.04.

Graceful Restart option will only reload the apache configuration file. If you make changes to the apache configuration file, then you can use the graceful option to reread the configuration file, without having to restart entire apache2 process.

sudo apache2ctl graceful

You could still use service Command or init.d script restart Apache in Ubuntu , but both commands will redirect to the systemctl command.

submit to reddit