LoginSignup
214
207

More than 5 years have passed since last update.

Apacheの設定ファイル httpd.confの場所

Posted at

Apacheの場所の確認方法。

1つのサーバの中に2つのApacheがインストールしてあるサーバがあったので(パッケージとソース)
稼働しているApacheの確認方法をメモ。

httpd.confの場所

基本的には下記のディレクトリにある可能性がたかい。

OSとインストール方法 ディレクトリ
CentOS,RHEL,Fedoraなど(パッケージ) /etc/httpd/conf/
SUSE,Debian,MacOSなど(パッケージ) /etc/apache2/
ソースインストール /usr/local/apache2/conf/

どのhttpdが動いているか

$ ps aux | grep httpd
でプロセスを確認。

$ ps aux | grep httpd
root      3753  0.0  0.0 360324  8800 ?        Ss   14:34   0:01 /usr/local/apache2/bin/httpd
daemon   24098  1.2  0.1 367424 59964 ?        S    15:42   0:05 /usr/local/apache2/bin/httpd
daemon   25171  1.4  0.1 364604 48812 ?        S    15:45   0:03 /usr/local/apache2/bin/httpd
daemon   25638  0.6  0.0 366780 26112 ?        S    15:48   0:00 /usr/local/apache2/bin/httpd
daemon   25639  0.6  0.0 364752 30212 ?        S    15:48   0:00 /usr/local/apache2/bin/httpd
daemon   25640  0.3  0.0 362960 25860 ?        S    15:48   0:00 /usr/local/apache2/bin/httpd

/usr/local/apache2/以下が読み込まれているため、ソースインストールしたApacheが稼働していると判断。

$ httpd -V

なんかをしておくと各ディレクトリがわかってさらにいい感じ。

214
207
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
214
207