2 messages in ru.sysoev.nginxRe: Apache vs. Nginx LogFormat
FromSent OnAttachments
Martin MinkaApr 4, 2007 10:51 pm 
Igor SysoevApr 5, 2007 12:17 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Apache vs. Nginx LogFormatActions...
From:Igor Sysoev (is-G@public.gmane.org)
Date:Apr 5, 2007 12:17:02 am
List:ru.sysoev.nginx

On Thu, Apr 05, 2007 at 07:51:28AM +0200, Martin Minka wrote:

could somebody help me to rewrite Apache LogFormat command to Nginx ?

the Apache format is: LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" \"%{cookie}i\" %v" combined

log_format cookie '$remote_addr - $remote_user ' '[$time_local] "$request" $status $bytes_sent ' '"$http_referer" "$http_user_agent" ' '"$http_cookie" "$server_name"' ;

Some comments:

*) you could not name your format "combined" because there's already predefined "combined" format compatible with Apache's one.

*) there's no %l in nginx: it useless in modern Internet and Apache disables it by default: "IdentityCheck off".