Empty error log

Valentin V. Bartenev vbart at nginx.com
Wed Jan 8 09:19:15 UTC 2014


On Wednesday 08 January 2014 13:07:50 chAlx wrote:
> I have installed Nginx for a small web server with static content. It works
> fine but the site error log file is always empty. All errors such as 404
> are written to the access log only. File grants are the same for access and
> error logs.
> 
> I've tried to change error_log param from "error" to "warn" and that didn't
> help. But changing it to "debug" was successful: log was filled with debug
> info (but no error info).
> 
> My config files:
[..]
> /etc/nginx/sites-available/mysite.conf:
> 
> server {
>           listen   80;
>           root /var/www/mysite;
>           index index.html index.htm;
>           server_name mysite.org;
>           access_log /var/log/nginx/mysite_access.log combined;
>           error_log /var/log/nginx/mysite_error.log error;
>           log_subrequest on;
>           location / {
>                   try_files $uri $uri/ =404;

You should remove "try_files" directive if you want to see file access errors 
in the error log.

 wbr, Valentin V. Bartenev



More information about the nginx mailing list