Assuming that the current Linux user's APAHCE installation directory is/usr/local/apache2, use the following command in the command line terminal to start, stop, and restart Apache.
1. Start the APAHCE command:
/usr/local/apache2/bin/apachectl start Apache
2. Stop Apache's command:
/usr/local/apache2/bin/apachectl Stop
3. Restart the Apache command:
/usr/local/apache2/bin/apachectl Restart
to restart the Apache server without interrupting the current connection, you should run:
/usr/local/sbin/apachectl Graceful
if the current user's Apache is already installed as a Linux service, you can do so using the following command.
1. Launch Apache
Service httpd Start
2. Stop service Apache
Service httpd Stop
3. Restart Apache
Service httpd Restart
Ubuntu System
One, start Apache 2 Server/start Apache service
#/etc/init.d/apache2 Startor
$ sudo/etc/init.d/apache2 Start
Second, Restart Apache 2 Server/restart Apache service
#/etc/init.d/apache2 Restartor
$ sudo/etc/init.d/apache2 Restart
third, stop Apache 2 Server/stop Apache service
#/etc/init.d/apache2 Stopor
$ sudo/etc/init.d/apache2 Stop
How to restart the Apache2 service