Welcome! Log In Create A New Profile

Advanced

How to: Enable hostname lookups to nginx

Posted by peja 
How to: Enable hostname lookups to nginx
January 19, 2012 11:45AM
Hi,

I use Debian 6.0 (squeeze) and nginx default package.

I recently moved to use nginx.

I want to know how to enable hostname lookups to logfiles?


I used Apache2 before.
I used "HostnameLookups On".

Log files are now in format:
1.2.3.4 - - [01/Dec/2011:11:31:52 +0200] "GET / HTTP/1.1" 200 578 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0"

and wanted like in Apache2
my.hostname.domain.x - - [01/Dec/2011:11:31:52 +0200] "GET / HTTP/1.1" 200 578 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0"

Please help.

Thank you very much for help.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 143
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready