Apache
Версія
/usr/sbin/apache2 -v
Server version: Apache/2.4.29 (Ubuntu)
Server built: 2020-03-13T12:26:16"
Стан
service apache2 stаtus
Стоп, старт, рестарт
sudo service apache2 stop|start|restart
а також, в інших дистрибутивах Linux:
systemctl status httpd
sudo systemctl stop|start|restart httpd.service
/etc/init.d/apache2 status
/etc/init.d/apache2 stop|start|restart|reload|force-reload
Перевірка конфігурації
sudo apache2ctl configtest
Допомагає знайти помилку у файлах конфігурації
! В случае появления сообщения
AH00558: httpd: Could not reliably determine the server's fully qualified
необходимо прописатьServerName localhost
в файле /etc/apache2/apache2.conf (или /etc/httpd/conf/httpd.conf)
restart и reload - разница?
restart: останавливает (stop), а затем запускает (start) службу Apache.
reload: изящно перезапускает службу Apache. При reload основной процесс Apache завершает работу дочерних процессов, загружает новую конфигурацию и запускает новые дочерние процессы.
Last updated