Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

This is my log_format in nginx

   log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
             '$status $body_bytes_sent "$http_referer" '
             '"$http_user_agent" "$http_x_forwarded_for"'
             ' $request_time';

And here is the output of the access log

x.x.155.x - - [31/Oct/2011:03:54:18 +0000] "POST /xx/ HTTP/1.1" 200 127 "http://xx/" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.202 Safari/535.1"

Somehow the request time is not getting logged. Can someone help figure out the problem?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

I suspect that you haven't specified the main as format for access_log:

access_log /var/log/nginx/localhost.access_log main;

so the combined format is used.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.