# Disabling logging of absolute paths

**URL:** <https://www.ruby-forum.com/t/disabling-logging-of-absolute-paths/215541>\
**Category:** NGINX\
**Created:** [January 7, 2012, 4:38pm UTC](https://www.ruby-forum.com/t/disabling-logging-of-absolute-paths/215541 "2012-01-07T16:38:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [January 7, 2012, 4:38pm UTC](https://www.ruby-forum.com/t/disabling-logging-of-absolute-paths/215541/1 "2012-01-07T16:38:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![U.Mutlu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/a698b9/32.png) [@U.Mutlu](https://www.ruby-forum.com/u/U.Mutlu)\
**Post date:** [January 7, 2012, 6:47pm UTC](https://www.ruby-forum.com/t/disabling-logging-of-absolute-paths/215541/2 "2012-01-07T18:47:05Z")

</div>

On Jan 7, 2012, at 5:09 AM, U.Mutlu wrote:

> Reason: I don’t want disclose my file system structure when posting log excerpts  
> to abuse desks etc.

Then redact them before posting.

–Brian

---

<div class="post-metadata">

**Author:** ![U.Mutlu](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/a698b9/32.png) [@U.Mutlu](https://www.ruby-forum.com/u/U.Mutlu)\
**Post date:** [January 7, 2012, 9:58pm UTC](https://www.ruby-forum.com/t/disabling-logging-of-absolute-paths/215541/3 "2012-01-07T21:58:11Z")

</div>

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 D.
