Ubuntu – Apache2 start/stop/restart

If your prompt starts with a $ then you will need to precede the command with sudo.

Start

# /etc/init.d/apache2 start

or

$ sudo /etc/init.d/apache2 start

Stop

# /etc/init.d/apache2 stop

or

$ sudo /etc/init.d/apache2 stop

Restart

# /etc/init.d/apache2 restart

or

$ sudo /etc/init.d/apache2 restart

Leave a Reply

Your email address will not be published. Required fields are marked *