Home  >  Article  >  Operation and Maintenance  >  How to restart apache

How to restart apache

藏色散人
藏色散人Original
2019-08-09 09:47:528827browse

How to restart apache

How to restart apache?

Restart Apache under windows

● First, right-click "This Computer" and click "Manage";

● In In the "Computer Management" program that opens, double-click "Services and Applications."

● In the "Computer Management" program that opens, double-click "Services".

● In the list of all services, click "apache";

● If apache is not started, "Start Service" is displayed on the left, and clicking it will start the service

● If apache has been started, "Stop and Restart Service" is displayed on the left. Clicking it will perform the operation

Restart Apache under Linux

Assume the apahce installation directory of the current Linux user is /usr/local/apache2, then use the following commands in the command line terminal to start, stop and restart apache.

1. The command to start apahce:

/usr/local/apache2/bin/apachectl start apache

2. The command to stop apache:

/usr/local/apache2/bin/apachectl stop

3. The command to restart apache:

/usr/local/apache2/bin/apachectl restart

To be in To restart the Apache server without interrupting the current connection, you should run:

/usr/local/sbin/apachectl graceful

If the current user's apache has been installed as a Linux service, you can use the following command to perform the above operations.

1. Start apache

service httpd start

2. Stop serving apache

service httpd stop

3. Restart apache

service httpd restart

For more Apache related knowledge, please visitApache usage tutorial column!

The above is the detailed content of How to restart apache. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn