Operate Apache's most basic start stop and restart commands on the Linux system

  • 2020-05-14 05:23:50
  • OfStack

This article assumes that your apahce installation directory is /usr/local/apache2. These methods are suitable for any situation

apahce startup command:
Recommend/usr local/apache2 bin/apachectl start apaceh startup

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 breaking the current connection, run:


/usr/local/sbin/apachectl graceful

If apache is installed as an linux service, you can use the following command:


service httpd start 

Start the


service httpd restart 

Restart the


Related articles: