Im trying logging nginx to be apache compliant. i added at the end the http_x_forwarded_for because we get some requests from CDN's and i want to be able to see who is reaching us.

I tried to import the logs i get to some apache log analyzers but mostly all had problems with my log formatting.

what im doing wrong ?

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

# main access log
access_log  /var/log/nginx/access.log  main;
link|improve this question

69% accept rate
What problems did you have? Is it not adding the X-Forwarded-For header? – slillibri Sep 29 '11 at 18:23
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown

Browse other questions tagged or ask your own question.