Problem with error file

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

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:

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.


Maxim D.
http://nginx.org/

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:[email protected]] En nombre de Maxim D.
Enviado el: lunes, 29 de febrero de 2016 10:55
Para: [email protected]
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.


Maxim D.
http://nginx.org/


nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

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.
http://nginx.org/

Maxim,

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

Regards,

Ricardo

-----Mensaje original-----
De: nginx [mailto:[email protected]] En nombre de Maxim D.
Enviado el: lunes, 29 de febrero de 2016 11:49
Para: [email protected]
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.
http://nginx.org/


nginx mailing list
[email protected]
http://mailman.nginx.org/mailman/listinfo/nginx

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:

http://nginx.org/r/error_log


Maxim D.
http://nginx.org/

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.

Also, since it seems to be one file, you can use the “log_not_found”
directive. See
Module ngx_http_core_module.

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