日期:2014-05-16  浏览次数:20783 次

apache和nginx的一些配置资料

?

最近在做的是web server从apache到nginx的转换,

主要的工作就是日志格式还有rewrite以及虚拟主机的转换。

?

以下是我查阅到的比较有用的配置资料和一些总结:

1、apache的LogFormat选项(配置参数/内置变量):

(来自:http://httpd.apache.org/docs/2.2/mod/mod_log_config.html#formats)

?

? ? ? ? The characteristics of the request itself are logged by placing "%" directives in the format string, which are replaced in the log file by the values as follows:

Format?String Description
%% The percent sign
%a Remote IP-address
%A Local IP-address
%B Size of response in bytes, excluding HTTP headers.
%b Size of response in bytes, excluding HTTP headers. In CLF format,?i.e.?a '-' rather than a 0 when no bytes are sent.
%{Foobar}C The contents of cookie?Foobar?in the request sent to the server. Only version 0 cookies are fully supported.
%D The time taken to serve the request, in microseconds.
%{FOOBAR}e The contents of the environment variable?FOOBAR