EN
Linux apache2 start, stop, restart / systemctl status reload (Debian, Ubuntu)
4
points
Quick solution:
sudo service apache2 restart
sudo service apache2 start
sudo service apache2 stop
Second option:
sudo /etc/init.d/apache2 restart
sudo /etc/init.d/apache2 start
sudo /etc/init.d/apache2 stop
systemctl apache2
# status
sudo systemctl status apache2.service
# reload
sudo systemctl reload apache2
Other useful examples:
root@server:/etc/apache2/sites-available# a2en
a2enconf a2enmod a2ensite
root@server:/etc/apache2/sites-available# a2
a2disconf a2dismod a2dissite a2enconf a2enmod a2ensite a2query
root@server:/etc/apache2/sites-available# a2ensite my-site.com.conf
Enabling site my-site.com.
To activate the new configuration, you need to run:
systemctl reload apache2