What is apache ?

Apache is an open-source, cross-platform web server which is one of the most popular web server in existence. It’s actively maintained by the Apache Software Foundation.

Lets begin!

If you want to restart apache you can try following commands:

/etc/init.d/apache2 restart
sudo /etc/init.d/apache2 restart

sudo service apache2 restart

Try any of those and see which one works for you, there may be a case where you have PHP FPM active in this case above commands wouldn’t work then you have to try this command:

sudo systemctl restart php-fpm

If you wish to stop then try following commands

/etc/init.d/apache2 stop
sudo /etc/init.d/apache2 stop

sudo service apache2 stop


sudo systemctl stop php-fpm

Last but not least, here is how you can start again :

sudo /etc/init.d/apache2 start

/etc/init.d/apache2 start

sudo service apache2 start

If on PHP FPM then

sudo systemctl start php-fpm

Good Luck!

(Visited 23 times, 1 visits today)