# borrowed from Apache # (Could use $host instead of $server_name to log vhost aliases separately) log_format vhost_combined '$server_name $remote_addr - $remote_user [$time_local] ' '"$request" $status $body_bytes_sent ' '"$http_referer" "$http_user_agent"'; log_format lb_combined '$remote_addr ($http_x_forwarded_for) $remote_user [$time_local] ' '"$request" $status $body_bytes_sent ' '"$http_referer" "$http_user_agent"'; log_format vhost_lb_combined '$server_name $remote_addr ($http_x_forwarded_for) $remote_user [$time_local] ' '"$request" $status $body_bytes_sent ' '"$http_referer" "$http_user_agent"'; # DOESN'T WORK -- Disable default logging ## access_log off; # Define an access log for VirtualHosts that don't define their own logfile access_log /var/log/nginx/other_vhosts_access.log vhost_combined;