How to restart the Apache2 service

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.