Disabling logging of absolute paths

Maxim Dounin mdounin at mdounin.ru
Sat Jan 7 20:57:24 UTC 2012


Hello!

On Sat, Jan 07, 2012 at 11:09:54AM +0100, U.Mutlu wrote:

> Is there a switch to suppress the logging of absolute paths in the log files?
> Only paths relative to the html directory should be logged.
> Reason: I don't want disclose my file system structure when posting log excerpts to abuse desks etc.
> 
> Sanitized example:
> 2012/01/02 00:04:48 [error] 566#0: *966 open() "/bla/foo/nginx/html/admin/index.php" failed (2: No such file or directory), client: 111.171.207.252, server: localhost, request: "GET //admin/index.php HTTP/1.1", host: "x.200.43.136"
> 
> Ie. the "/bla/foo/nginx/html" part should not be logged.

No, there is no such option for error log.  You may use access log 
instead.

Maxim Dounin



More information about the nginx mailing list