Apache server is an open-source and cross-platform HTTP server, primarily used to serve both static content and dynamic Web pages on the World Wide Web.
Starting, stopping, and restarting/reloading are the most common tasks while working with an Apache webserver by a developer or system administrator. In this article, I’ll explain how to start, stop, and restart the Apache server on the most famous Debian/Ubuntu Linux distributions.
Start Apache 2 webserver
Execute the following command to start the Apache service:
Start Apache in Debian:
systemctl start apache2.service
Start Apache in Ubuntu:
/etc/init.d/apache2 start
or
service apache2 start
Stop Apache 2 web server
Execute the following command to stop the Apache service:
Stop Apache in Debian:
systemctl stop apache2.service
Stop Apache in Ubuntu:
/etc/init.d/apache2 stop
or
service apache2 stop
Restart Apache 2 web server
Whenever you make changes to the Apache configuration, you need to restart the server processes. Execute the following command to restart the Apache service:
Restart Apache in Debian:
systemctl restart apache2.service
Restart Apache in Ubuntu:
/etc/init.d/apache2 restart
or
service apache2 restart
Comments