view apache2 commands httpd-v
where httpd_root and server_config_file can determine the path to httpd.conf
Assuming that the current Linux user's APAHCE installation directory is/usr/local/apache2, use the following command to start, stop, and restart Apache in the command line terminal.
1. Command to start Apahce:
/usr/local/apache2/bin/apachectl start Apache
2. command to stop Apache:
/usr/local/apache2/bin/apachectl stop
3. command to restart Apache:
/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 service for Linux, you can do so using the following command.
1. Start Apache
Service httpd start
2. Stop service Apache
Service httpd Stop
3. Restart Apache
Service httpd restart
Linux System for Ubuntu
One, start Apache 2 Server/boot Apache Service
#/etc/init.d/apache2 start
or
$ sudo/etc/ Init.d/apache2 start
II, Restart Apache 2 Server/restart Apache Service
#/etc/init.d/apache2 Restart
or
$ sudo/etc/ Init.d/apache2 Restart
Three, stop Apache 2 Server/Stop Apache Service
#/etc/init.d/apache2 Stop
or
$ sudo/etc/init.d/ Apache2 Stop
Apache ubunte Restart command