nginx logs

Avatar
  • updated
  • Answered
Hello,

I would like to know how to configure NGinx log format to be compatible with Apache combined log format (including vhosts).

Thank you very much,

Frederic
Avatar
Michael
You should try to use the following log format in Nginx:

log_format vhosts '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" $host';

You can find more information on configuring Nginx to use this format at http://articles.slicehost.com/2010/8/... and https://www.weblogexpert.com/info/Ngi...