To restart an apache 2 server or service, we can use the systemctl command-line utility followed by the restart apache2.service command in Linux.
# Restarts Apache 2 service
sudo systemctl restart apache2.service
What is systemctl?
- The
systemctlis a command-line utility that is used to control and manage thesystemdservices. - It is widely used with web server services like Apache, Nginx, etc.