Start, Stop, or Restart Apache Server on Ubuntu

Start Apache Web Server

For Ubuntu users with versions 16.04 and 18.04 and Debian 9.x users, use the following commands in the terminal window to start Apache:

sudo systemctl start apache2

Check status to see whether Apache is enabled with the command:

sudo systemctl status apache2

Stop Apache Web Server

Use the following commands in the terminal window to stop Apache:

sudo systemctl stop apache2

Check status to see whether Apache is disabled with the command:

sudo systemctl status apache2

Restart Apache Web Server

To restart Apache use the command:

sudo systemctl restart apache2