How to stop apache server?

In this article let’s discuss about How to stop apache server?. 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

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 :

# On Ubuntu
## Start command ##
systemctl start apache2.service
## Stop command ##
systemctl stop apache2.service
## Restart command ##
systemctl restart apache2.service

Hope the above solution works.

Realted Posts : How to copy ssh key on mac?