Start/Stop/Restart Apache On Ubuntu

In this quick and to the point post I will show you the commands you can use to start, stop and restart the Apache service using your Terminal. This is the quickest way to do it and is needed if you are trying to do things like change configurations, add modules for example while installing a LAMP server. First thing you need to do is open a Terminal (if you are using regular Ubuntu not Ubuntu Server, if you are doing this then you will need to SSH into your server. I will also tell you choose best hosting companies below.)

Connecting To Your Server

If you are running Windows but need to do this on an Ubuntu server then you can connect using Putty (free), if you are running Linux you can do this by running the following command.

ssh IP.Goes.Right.Here -l root

Start Apache Ubuntu

You can start Apache if its not already running by executing the command below.

sudo /etc/int.d/apache2 start

Stop Apache Ubuntu

You can stop Apache if its currently running by executing the following command.

sudo /etc/int.d/apache2 stop

Restart Apache Ubuntu

You can restart Apache after making changes and installing modules and such by running this command.

sudo /etc/int.d/apache2 restart

Incoming search terms: