Apache で HTTP 接続でも HTTPS 接続でも同じように combined ログが記録さ れるようにするには、以下のようにすればよい。
まず、 httpd.conf で以下の記述が有効になるようにする。
logio モジュールが有効になっていなければ有効にする。CustomLog "/var/log/httpd/access_log" combined
LoadModule logio_module lib/httpd/mod_logio.so
次に、 httpd-ssl.conf に以下の記述を追加する。
以下のようになっていればよい。LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""
## ## SSL Virtual Host Context ### General setup for the virtual host DocumentRoot "/usr/pkg/share/httpd/htdocs" ServerName aaa.bbb.ccc.ddd:443 ServerAdmin xxx@yyy.zzz ErrorLog "/var/log/httpd/error_log" LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" TransferLog "/var/log/httpd/access_log"
そして、 Apache を再起動すればよい。
まず、 httpd.conf を以下のように変更する。
#CustomLog "/var/log/httpd/access_log" combined CustomLog "/var/log/httpd/access_log" combinedio
次に、 httpd-ssl.conf を以下のように変更する。
#LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\"" LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %I %O"
そして、 Apache を再起動すればよい。