| Syntax: | error_log file | stderr [ debug | info | notice | warn | error | crit | alert | emerg ] |
| Default: | logs/error.log error |
| Context: | main http server location |
| Reference: | error_log |
Specifies the file where server (and fastcgi) errors are logged.
Default values for the error level:
error crit crit If you've built Nginx with --with-debug, you may also use:
error_log LOGFILE [debug_core | debug_alloc | debug_mutex | debug_event | debug_http | debug_imap];
Note that error_log off does not disable logging - the log will be written to a file named "off". To disable logging, you may use:
error_log /dev/null crit;
Also note that as of version 0.7.53, nginx will use a compiled-in default error log location until it has read the config file. If the user running nginx doesn't have write permission to this log location, nginx will raise an alert like this:
[alert]: could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)