How to log server_name in access_log.

Matteo Niccoli matteo.niccoli at staff.dada.net
Tue Oct 2 12:59:56 MSD 2007


Hi,

I have a single access_log for each vhost configured in nginx. I tried to
find in web, google, newsgroup, and so on, but i'm not able to log, as
first field of log row, the server_name. Actually nginx logs as first field
the ip client. I need to log the server_name. With apache I use this:

LogFormat "%v %h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
\"%{User-Agent}i\" VLOG=%{VLOG}e"

Thanks.







More information about the nginx mailing list