How do I restart Apache?
I am running Ubuntu and am having issues with Apache. How can I restart the service?
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