2013年5月23日木曜日

apacheのインストール(2)

ということで、apacheインストールのつづき。

1.自動起動設定

毎回PC落とすと落ちるのも面倒なので、自動起動設定を仕込む。

# cp /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/httpd
# vi /etc/rc.d/init.d/httpd
>>
#!/bin/sh
#
# chkconfig:345 85 15
#
# Licensed to the Apache Software Foundation (ASF) under one or more
<<

起動シェルの先頭に追加して、、

# chkconfig --add httpd
# chkconfig --list httpd
httpd           0:off   1:off   2:off   3:on    4:on    5:on    6:off

これでばっちり。

次に、、前回の積み残しの、server-statusを解決する。

2.httpd.confの確認

# vi /usr/local/apache2/conf/httpd.conf
>>
LoadModule status_module modules/mod_status.so



Include conf/extra/httpd-info.conf
<<

3.httpd-info.confの確認

# vi /usr/local/apache2/conf/extra/httpd-info.conf
>>
<Location /server-status>
    SetHandler server-status
    Require ip 127.0.0.1
</Location>
<<

4.IPv6の無効化

変なところで引っかかるので無効に。手順はここ

5.ステータスの確認


# service httpd status
               Apache Server Status for localhost (via 127.0.0.1)

   Server Version: Apache/2.4.4 (Unix)
   Server Built: May 23 2013 00:41:30
     __________________________________________________________________

   Current Time: Thursday, 23-May-2013 01:52:09 JST
   Restart Time: Thursday, 23-May-2013 01:52:05 JST
   Parent Server Config. Generation: 2
   Parent Server MPM Generation: 1
   Server uptime: 3 seconds
   Server load: 0.00 0.03 0.01
   Total accesses: 0 - Total Traffic: 0 kB
   CPU Usage: u0 s0 cu0 cs0
   0 requests/sec - 0 B/second -
   1 requests currently being processed, 74 idle workers

   PID    Connections    Threads      Async connections
        total accepting busy idle writing keep-alive closing
   1194 0     yes       0    25   0       0          0
   1195 0     yes       1    24   0       0          0
   1196 0     yes       0    25   0       0          0
   Sum  0               1    74   0       0          0

_________________________W______________________________________
___________.....................................................
................................................................
................................................................
................................................................
................................................................
................

   Scoreboard Key:
   "_" Waiting for Connection, "S" Starting up, "R" Reading Request,
   "W" Sending Reply, "K" Keepalive (read), "D" DNS Lookup,
   "C" Closing connection, "L" Logging, "G" Gracefully finishing,
   "I" Idle cleanup of worker, "." Open slot with no current process


みれた!ふぅ。。次回は目的のWebDAVにチャレンジ。

0 件のコメント:

コメントを投稿