On the World Wide Web, Apache is generally used to deliver both static and dynamic Web sites. Many web applications are created with the functionality and environment that Apache offers in mind. On Linux or Unix-like systems, Apache can be started or resumed using any of the following techniques.


Start the Apache2 server and run the following command:

sudo systemctl start apache2


Stop the Apache2 server and run the following command:

sudo systemctl stop apache2


Restart the Apache2 server and run the following command:

sudo systemctl restart apache2


Check the status of the Apache2 server and run the following command:

sudo systemctl status apache2


Most of the time, Apache can reload without losing connections if you are only making configuration changes. Use this command to accomplish this:

sudo systemctl reload apache2


When the server boots, Apache is set up by default to launch automatically. Disable this behavior by typing: following command : 

sudo systemctl disable apache2


Type: to make the service start up again at boot: 

sudo systemctl enable apache2


Hope this article help you How to start, stop, and restart the Apache 2 Web Server Command


Share