ports更新

apache-event-2.2.11_6               <   needs updating (port has 2.2.11_7)
ruby-1.8.7.160,1                    <   needs updating (port has 1.8.7.160_1,1)

最近パタパタとapacheが更新されているのでアクセスログをちといじってみた。
nginx.confで

    proxy_set_header    X-Real-IP        $remote_addr;
    proxy_set_header    X-Real-PORT      $remote_port;

として、httpd.confで


    
      LogFormat "%h:%{remote}p %V %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-A
gent}i\" %I %O" combinedio
      LogFormat "%{X-Real-IP}i:%{X-Real-PORT}i %V %u %t \"%r\" %>s %b \"%{Refere
r}i\" \"%{User-Agent}i\" %I %O" combinedio-forward
    
    SetEnvIf X-Real-IP "^.*\..*\..*\..*" forward
    CustomLog "/var/log/httpd-access.log" combinedio-forward env=forward
    CustomLog "/var/log/httpd-access.log" combinedio env=!forward

と設定してnginxにアクセスしてきたIPアドレスとポート番号をバックエンドのapache側でも記録するようにしてみた。


もっとも、nginxでログ取ってるからapacheで再度取る必要は無かったりするけど。というか、apacheaccess.log取らない方が軽いんだよなぁ。bufferとか取ればいいんだろうけど。