How to Restart Apache on Ubuntu

To restart Apache on Ubuntu you have some options to execute.

A simple restart:

sudo service apache2 restart

You can also stop and start the service.

sudo service apache2 stop
sudo service apache2 start

If you just want to reload the configuration

sudo service apache2 reload

There is also the option to use systemctl

sudo systemctl restart apache2

And the same with stop and start for the service.

sudo systemctl stop apache2
sudo systemctl start apache2

Leave a Reply

Your email address will not be published. Required fields are marked *