Ubuntu apache2 command

In this article let’s discuss about Ubuntu apache2 command. Let’s go through the following methods without any delay.

Method 1:

# Restart Apache 2 server on Linux/Unix
sudo service apache2 restart

# Start Apache 2 server on Linux/Unix
sudo service apache2 start

# Stop Apache 2 server on Linux/Unix
sudo service apache2 stop

# Reload Apache 2 server on Linux/Unix "No downtime!"
sudo service apache2 reload

If you are facing any issues with the above approach then try the alternative that is given below. It may look similar but have a try!

Method 2 :

sudo systemctl start apache2
sudo systemctl stop apache2
sudo systemctl restart apache2
sudo systemctl status apache2

Hope the above solution works.

Realted Posts : How to delete node_modules