Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to see the content-type of a response to a request in Nginx's log file? At the moment, this is what I see for the request in question: - - [23/Nov/2012:10:17:19 -0500] "GET /fonts/cantarell-bold-webfont.eot? HTTP/1.1" 200 22679 "" "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET4.0C)"
share|improve this question
up vote 4 down vote accepted

According to the official nginx documentation, you can use $sent_http_content_type in your log_format statement :

log_format myCustomFormatTemplate '$remote_addr - $remote_user [$time_local]  '
    '"$request" $status $sent_http_content_type $body_bytes_sent '
    '"$http_referer" "$http_user_agent"';
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.