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