Home>Article>Operation and Maintenance> How to start apache in linux
Recommended: [Linux video tutorial]
How to start apache in Linux?
Basic operation method:
This article assumes that your apahce installation directory is /usr/local/apache2, these methods are suitable for any situation
apahce start command:
Recommended/usr/local/apache2/bin/apachectl start apaceh start
apache stop command
/usr/local/apache2/bin/ apachectl stop Stop
apache restart command:
/usr/local/apache2/bin/apachectl restart Restart
To restart the Apache server without interrupting the current connection, You should run:
/usr/local/sbin/apachectl graceful
If apache is installed as a Linux service, you can use the following command:
service httpd start start
service httpd restart Restart
service httpd stop Stop the service
Linux system is Ubuntu
1. Start Apache 2 Server /Start apache service
# /etc/init.d/apache2 start or $ sudo /etc/init.d/apache2 start
2. Restart Apache 2 Server /Restart apache service
# /etc/init.d/apache2 restart or $ sudo /etc/init.d/apache2 restart
3. Stop Apache 2 Server /Stop apache service
# /etc/init.d/apache2 stop or $ sudo /etc/init.d/apache2 stop
More Apache related knowledge , please visit theApache usage tutorialcolumn!
The above is the detailed content of How to start apache in linux. For more information, please follow other related articles on the PHP Chinese website!