Apache Server: Apache is essential for the well known LAMP (Linux, Apache, MySQL, PHP) pile of programming. It is incorporated with the most recent rendition of Ubuntu 18.04 as a matter of course.
This aide will tell you the best way to begin, stop, and restart Apache administration on Ubuntu utilizing the terminal.
Essentials
• Access to a client account with sudo or root advantages
• An introduced and arranged Apache establishment
• The adept bundle chief, included naturally
• A order line/terminal window (Ctrl-Alt-T)
Ubuntu 18.04, 16.04, and Debian 9.x Commands
Start Apache Web Server
For Ubuntu clients with forms 16.04 and 18.04 and Debian 9.x clients, utilize the accompanying orders in the terminal window to begin Apache:
sudo systemctl start apache2
Check status to see whether Apache is empowered with the order:
sudo systemctl status apache2
In case it is running, it should show the message dynamic (running) as in the picture underneath.
Stop Apache Server
Utilize the accompanying orders in the terminal window to stop Apache:
sudo systemctl stop apache2
Check status to see whether Apache is crippled with the order:
sudo systemctl status apache2
In the event that it has quit running, it should show the message latent (dead) as in the picture beneath.
Restart Apache Server
To restart Apache utilize the order:
sudo systemctl restart apache2
In case Apache was recently incapacitated, a status check will show that it is going once more.
Ubuntu 14.10 or more established Debian
Start Apache
For Ubuntu and Debian clients with a more established variant, utilize the accompanying orders in the terminal window to begin Apache:
sudo administration apache2 start
sudo/and so forth/init.d/apache2 start
Check status to see whether Apache is empowered with the order:
sudo administration apache2 status
sudo/and so forth/init.d/apache2 status
It should show the message dynamic (running).
Stop Apache
To stop Apache utilize the accompanying order:
sudo administration apache2 stop
sudo/and so on/init.d/apache2 stop
Check status to see whether Apache is handicapped with the order:
sudo/and so on/init.d/apache2 status
It should show the message dormant (dead) as in the picture underneath.
Restart Apache
To restart Apache utilize the order:
sudo administration apache2 restart
sudo/and so forth/init.d/apache2 restart
End
Beginning, halting and restarting the Apache administration on Ubuntu is clear. Realizing how to do these essential assignments from the terminal line makes the errand quicker and simpler.