1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

「apachectl」、「apache2ctl」コマンド

Posted at

●「apachectl」、「apache2ctl」コマンド
起動中のWebサーバに設定を反映させるためにはWebサーバを再起動する必要があり。Apacheの制御用コマンドには、RedHat系では「apachectl」、Debian系では「apache2ctl」コマンドがあります。

apachectl(apache2ctl)コマンドの書式およびサブコマンド。

apachectl [サブコマンド]
apache2ctl [サブコマンド]

・start Apacheの起動
・stop Apacheの終了
・restart Apacheの再起動
・graceful Apacheを安全に再起動
・configtest 設定ファイルの構文チェック

●Apacheを終了するには以下のように起動スクリプトを使用する方法も。
・RedHat系: /etc/init.d/httpd stop
・Debian系: /etc/init.d/apache2 stop

systemdの場合は、例えばRedhat系の場合は、systemctl restart httpd.service。

・RedHat系のApacheのデーモンはhttpd、設定ファイルは「/etc/httpd/conf/httpd.conf」。
・Debian系の場合はデーモンはapache2、設定ファイルは「/etc/apache2/apache2.conf」。
それぞれ名称は異なりますが、動作や設定ファイルの書式は基本的に同じ

1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?