Command
sudo systemctl restart apache2Explanation
Restarts the Apache HTTP server service (closes all connections).
Examples
Restart Apache service (Systemd)
sudo systemctl restart apache2Restart Apache service (SysV)
sudo service apache2 restartsudo systemctl restart apache2Restarts the Apache HTTP server service (closes all connections).
Restart Apache service (Systemd)
sudo systemctl restart apache2Restart Apache service (SysV)
sudo service apache2 restart