# Problem with error file

**URL:** <https://www.ruby-forum.com/t/problem-with-error-file/244161>\
**Category:** NGINX\
**Created:** [February 29, 2016, 1:47pm UTC](https://www.ruby-forum.com/t/problem-with-error-file/244161 "2016-02-29T13:47:44Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rafa\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Rafa\_F](https://www.ruby-forum.com/u/Rafa_F)\
**Post date:** [February 29, 2016, 1:47pm UTC](https://www.ruby-forum.com/t/problem-with-error-file/244161/1 "2016-02-29T13:47:44Z")

</div>

Hi all!

I have installed NGINX v1.8.0 with PHP v 5.2.6 in Windows 7 (64 bits).

In the root directory of nginx (c:\nginx), a file called “error” is  
generated. The size of this file grows too, causing the hard drive runs  
out  
of free space.

Attachment my config file of nginx (nginx.conf).

Regards,

Ricardo

---

<div class="post-metadata">

**Author:** ![IngSRicardo\_SIFON](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/dbc845/32.png) [@IngSRicardo\_SIFON](https://www.ruby-forum.com/u/IngSRicardo_SIFON)\
**Post date:** [February 29, 2016, 2:43pm UTC](https://www.ruby-forum.com/t/problem-with-error-file/244161/2 "2016-02-29T14:43:49Z")

</div>

It would be more helpful to see whats in this error logfile.  
Don’t attach files here, use pastebin or the sorts.

Posted at Nginx Forum:

> **[Re: Problem with error file](https://forum.nginx.org/read.php?2,264925,264927#msg-264927)**
>
> Hi all! I have installed NGINX v1.8.0 with PHP v 5.2.6 in Windows 7 (64 bits). In the root directory of nginx (c:\\nginx\\), a file called "error" is generated. The size of this file grows too, causing the hard drive runs out

---

<div class="post-metadata">

**Author:** ![IngSRicardo\_SIFON](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/dbc845/32.png) [@IngSRicardo\_SIFON](https://www.ruby-forum.com/u/IngSRicardo_SIFON)\
**Post date:** [February 29, 2016, 2:54pm UTC](https://www.ruby-forum.com/t/problem-with-error-file/244161/3 "2016-02-29T14:54:55Z")

</div>

Hello!

On Mon, Feb 29, 2016 at 09:47:30AM -0300, Ing. Ricardo SIFON wrote:

> In the root directory of nginx (c:\nginx), a file called “error” is  
> generated. The size of this file grows too, causing the hard drive runs out  
> of free space.
> 
> Attachment my config file of nginx (nginx.conf).

Are you sure it’s called “error”? According to your  
configuration, it should be called “off”:

…  
error\_log off;  
…

Note that “off” isn’t a special value for the error\_log directive.  
To reduce logging of errors consider tuning the logging level  
instead, see [Core functionality](http://nginx.org/r/error_log).

–  
Maxim D.

> **[nginx](http://nginx.org/)**

---

<div class="post-metadata">

**Author:** ![IngSRicardo\_SIFON](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/dbc845/32.png) [@IngSRicardo\_SIFON](https://www.ruby-forum.com/u/IngSRicardo_SIFON)\
**Post date:** [February 29, 2016, 3:39pm UTC](https://www.ruby-forum.com/t/problem-with-error-file/244161/4 "2016-02-29T15:39:20Z")

</div>

Maxim,

I’m Sorry, I have made a mistake.

As you say, the line called: error\_log is in “off” in config file.

The file that I have problems is called: off (without extensin) in  
C:\nginx.

Its content is:

…

[error] 6072#0: \*27 open() “/cygdrive/c/nginx/html/robots.txt” failed  
(2: No  
such file or directory), client: 10.0.0.1, server: localhost, request:  
“GET  
/robots.txt HTTP/1.1”, host: “10.0.0.50”

…

The same message is repeated constantly.

Regards,

Ricardo

-----Mensaje original-----  
De: nginx [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] En nombre de Maxim D.  
Enviado el: lunes, 29 de febrero de 2016 10:55  
Para: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Asunto: Re: Problem with error file

Hello!

On Mon, Feb 29, 2016 at 09:47:30AM -0300, Ing. Ricardo SIFON wrote:

> In the root directory of nginx (c:\nginx), a file called “error” is  
> generated. The size of this file grows too, causing the hard drive runs  
> out  
> of free space.
> 
> Attachment my config file of nginx (nginx.conf).

Are you sure it’s called “error”? According to your  
configuration, it should be called “off”:

…  
error\_log off;  
…

Note that “off” isn’t a special value for the error\_log directive.  
To reduce logging of errors consider tuning the logging level  
instead, see [Core functionality](http://nginx.org/r/error_log).

–  
Maxim D.

> **[nginx](http://nginx.org/)**

* * *

nginx mailing list  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

---

<div class="post-metadata">

**Author:** ![IngSRicardo\_SIFON](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/dbc845/32.png) [@IngSRicardo\_SIFON](https://www.ruby-forum.com/u/IngSRicardo_SIFON)\
**Post date:** [February 29, 2016, 3:49pm UTC](https://www.ruby-forum.com/t/problem-with-error-file/244161/5 "2016-02-29T15:49:51Z")

</div>

Hello!

On Mon, Feb 29, 2016 at 11:39:04AM -0300, Ing. Ricardo SIFON wrote:

> Maxim,
> 
> I’m Sorry, I have made a mistake.
> 
> As you say, the line called: error\_log is in “off” in config file.
> 
> The file that I have problems is called: off (without extensión) in  
> C:\nginx.

So no problem here, nginx works exactly as you’ve configured it,  
writes errors to the file named “off”. If you want it to work  
differently - configure it differently.

–  
Maxim D.

> **[nginx](http://nginx.org/)**

---

<div class="post-metadata">

**Author:** ![IngSRicardo\_SIFON](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/dbc845/32.png) [@IngSRicardo\_SIFON](https://www.ruby-forum.com/u/IngSRicardo_SIFON)\
**Post date:** [February 29, 2016, 4:24pm UTC](https://www.ruby-forum.com/t/problem-with-error-file/244161/6 "2016-02-29T16:24:19Z")

</div>

Maxim,

How should I set nginx to avoid writing in the “off” file?

Regards,

Ricardo

-----Mensaje original-----  
De: nginx [[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)] En nombre de Maxim D.  
Enviado el: lunes, 29 de febrero de 2016 11:49  
Para: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Asunto: Re: Problem with error file

Hello!

On Mon, Feb 29, 2016 at 11:39:04AM -0300, Ing. Ricardo SIFON wrote:

> Maxim,
> 
> I’m Sorry, I have made a mistake.
> 
> As you say, the line called: error\_log is in “off” in config file.
> 
> The file that I have problems is called: off (without extensión) in  
> C:\nginx.

So no problem here, nginx works exactly as you’ve configured it,  
writes errors to the file named “off”. If you want it to work  
differently - configure it differently.

–  
Maxim D.

> **[nginx](http://nginx.org/)**

* * *

nginx mailing list  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> **[mailman.nginx.org archive](http://mailman.nginx.org/pipermail/)**

---

<div class="post-metadata">

**Author:** ![IngSRicardo\_SIFON](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/dbc845/32.png) [@IngSRicardo\_SIFON](https://www.ruby-forum.com/u/IngSRicardo_SIFON)\
**Post date:** [February 29, 2016, 4:32pm UTC](https://www.ruby-forum.com/t/problem-with-error-file/244161/7 "2016-02-29T16:32:30Z")

</div>

Hello!

On Mon, Feb 29, 2016 at 12:24:02PM -0300, Ing. Ricardo SIFON wrote:

> How should I set nginx to avoid writing in the “off” file?

Specify different filename using the “error\_log” directive. See  
details in the documentation here:

> **[Core functionality](http://nginx.org/en/docs/ngx_core_module.html#error_log)**
>
> Configures logging. Several logs can be specified on the same configuration level (1.5.2). If on the main configuration level writing a log to a file is not explicitly defined, the default file will be used.

–  
Maxim D.

> **[nginx](http://nginx.org/)**

---

<div class="post-metadata">

**Author:** ![IngSRicardo\_SIFON](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/dbc845/32.png) [@IngSRicardo\_SIFON](https://www.ruby-forum.com/u/IngSRicardo_SIFON)\
**Post date:** [February 29, 2016, 4:35pm UTC](https://www.ruby-forum.com/t/problem-with-error-file/244161/8 "2016-02-29T16:35:26Z")

</div>

Hello,

On 2/29/16 10:24 AM, Ing. Ricardo SIFON wrote:

> Maxim,
> 
> How should I set nginx to avoid writing in the “off” file?

You can set error logging to a different level. See  
[Core functionality](http://nginx.org/en/docs/ngx_core_module.html#error_log).

Also, since it seems to be one file, you can use the “log\_not\_found”  
directive. See  
[Module ngx\_http\_core\_module](http://nginx.org/en/docs/http/ngx_http_core_module.html#log_not_found).

Something like:

```
 location = /robots.txt {
     log_not_found off;
     access_log off;
 }

```

> On Mon, Feb 29, 2016 at 11:39:04AM -0300, Ing. Ricardo SIFON wrote:  
> So no problem here, nginx works exactly as you’ve configured it,  
> writes errors to the file named “off”. If you want it to work  
> differently - configure it differently.

–  
Jim O.

“Never argue with a fool, onlookers may not be able to tell the  
difference.” - Mark Twain
