How do I restart Apache?

Linode Staff

I am running Ubuntu and am having issues with Apache. How can I restart the service?

1 Reply

This will depend on which version of Ubuntu you are using.

For Ubuntu 15.04 or newer, you can run use following commands to start, stop, or restart your Apache service:

systemctl start apache2.service
systemctl stop apache2.service
systemctl restart apache2.service

To check the current status of Apache, you can run:

systemctl status apache2.service

For older versions of Ubuntu, you can use the these commands for the same results:

sudo service apache2 start
sudo service apache2 stop
sudo service apache2 restart

You can check the status of Apache on older Ubuntu distributions using:

sudo service apache2 status

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct