
| ・ |
ドキュメントセンターを初めてご利用する方や運営方針についての基本的な姿勢をご覧になりたい方へ。
|
| ご利用の皆様から多く寄せられる質問にお答えしています。 |
|
| ・ |
ディーエーオフィスなどが利用する用語に関する解説を行います。
|
|
|
 |
 |  |
Apache アクセスログファイル |
Apacheアクセスログファイルは、フォーマットが指定可能です。バーチャルホストなどの設定を行っている向きには、以下のような設定をおすすめします。LogFormatの定義は、combine、common、referer、agentがデフォルトで設定してあり、CustomLogで標準のaccess_logを出力しています。デフォルトはcommonですが、ここはLogFormatで指定したもの以外に、直接LogFormatを指定することもできます。
HostnameLookups Off
ErrorLog /usr/local/apache/logs/error_log
LogLevel warn
LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combine
LogFormat "%h %l %u %t "%r" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
LogFormat "%{%Y%m%d%H%M}t %h %V%U" original_name
#CustomLog /usr/local/apache/logs/access_log common # 元に設定してあったものをコメントアウト
CustomLog /usr/local/apache/logs/access_log original_name
---
以下を設定中
HostnameLookups On
ErrorLog /usr/local/apache/logs/error_log
LogLevel warn
LogFormat "%{%Y%m%d%H%M}t %V%U¥n %h¥n %{Referer}i¥n¥n" daoffice
SetEnvIf Request_URI .gif image-request
SetEnvIf Request_URI .jpg image-request
SetEnvIf Request_URI .png image-request
CustomLog /usr/local/apache/logs/access_log daoffice env=!image-request
ServerSignature On
---
%{%Y%m%d%H%M}t - "200401011200"の形式で時間を出力
%t - 時間
%h - リクエストしたリモートホスト
%V - リクエストの送信先となったサーバまたは仮想ホストの名前
%U - リクエストされたURLパス
その他については、文末の参照先を参考。
---
以下未整理。
HostnameLookups Off
ErrorLog /usr/local/apache/logs/error_log
LogLevel warn
#LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined
#LogFormat "%h %l %u %t "%r" %>s %b" common
#LogFormat "%{Referer}i -> %U" referer
#LogFormat "%{User-agent}i" agent
#LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i""
LogFormat "%h %{%Y%m%d%H%M}t "%v%U" %b "%{Referer}i""
#LogFormat "%h %l %u %t "%r" %>s %b" common
#LogFormat "%{Referer}i -> %U" referer
#LogFormat "%{User-agent}i" agent
# add by asedaisuke at 2002-04-02
SetEnvIf Request_URI .gif image-request
SetEnvIf Request_URI .jpg image-request
SetEnvIf Request_URI .png image-request
#CustomLog logs/access_log env=!image-request
CustomLog /usr/local/apache/logs/access_log "%h %{%Y%m%d%H%M}t "%v%U" %b "%{R
#CustomLog /usr/local/apache/logs/access_log common
# If you would like to have agent and referer logfiles, uncomment the
# following directives.
#CustomLog /usr/local/apache/logs/referer_log referer
#CustomLog /usr/local/apache/logs/agent_log agent
# If you prefer a single logfile with access, agent, and referer information
# (Combined Logfile Format) you can use the following directive.
|
[ 関連文書 ]ログファイル用の%書式指定子 (2005.02.08)
| 文書番号 |
00481 |
| 日付 |
2004.03.08 |
| 参照数 |
3906 |
|