Ubuntu 22.04 LTSにApache2の再起動・起動・停止コマンド
環境
Ubuntu 22.04 LTS
操作方法
1.Apache2のステータスを確認します
# sudo systemctl status apache2 ● apache2.service - The Apache HTTP Server Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2022-05-03 12:38:14 JST; 3h 43min ago Docs: https://httpd.apache.org/docs/2.4/
2.Apache2を停止します
# sudo service apache2 stop
3.Apache2を起動します
# sudo service apache2 start
4.Apache2を再起動します
# sudo service apache2 restart