LoginSignup
6
11

More than 3 years have passed since last update.

Dockerコンテナを止めずにapache2を再起動する方法【php7-apache】

Posted at

結論

下記コマンドでreloadさせれば、変更を有効化できます。

$ /etc/init.d/Apache2 reload

環境

Docker for Windows 19.03.8
DockerImage php:7.4-apache

背景

Dockerでローカル環境構築中に困りました。
普段CentOSで開発していると、設定ファイル変更後に有効化させる際、下記のコマンドをたたきたくなるところですが、
この場合コンテナごと停止してしまいます。

systemctl apache2[httpd] restart

コンテナを止めずに設定変更の有効化をするには下記のコマンドをたたきましょう。

$ /etc/init.d/Apache2 reload
6
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
11