Category Covered

how to start restart stop apache server in linux using shell script

You can do it on several way. Make sure you are logged in to the server

For start apache server
Start Apache 2 Server
or
# /etc/init.d/apache2 start
or
$ sudo /etc/init.d/apache2 start



For restart apache server
Restart Apache 2 Server
or
# /etc/init.d/apache2 restart
or
$ sudo /etc/init.d/apache2 restart
or
Restart Apache 2 Server



For stop apache server
# /etc/init.d/apache2 stop
or
$ sudo /etc/init.d/apache2 stop
or
Stop Apache 2 Server