Start/Restart/Stop Apache2 web server on linux

Here are some short commands for linux OS you can use to execute start/stop and restart apache services. Commands must be executed from linux terminal/ssh in other words they all are ssh commands.

To Start Apache2 web server:

# /etc/init.d/apache2 start
OR
# /etc/init.d/httpd start
OR
# service apache2 start
OR
# service httpd start

To Stop Apache2 web server:

# /etc/init.d/apache2 stop
OR
# /etc/init.d/httpd stop
OR
# service apache2 stop
OR
# service httpd stop

To Restart Apache2 web server:

# /etc/init.d/apache2 restart
OR
# /etc/init.d/httpd restart
OR
# service apache2 restart
OR
# service httpd restart

The above commands can be executed on any linux OS.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>