语法:error_log file level ; # error_log 是关键字,file 是保存错误日志的文件路径,level 是错误日志级别
位置:错误日志可以配置在 Main 区块,也可以配置在虚拟主机配置文件中
日志级别:debug | info | notice | warn | error | crit | alert | emerg ,级别越高,记录的信息越少
[root@localhost conf]# vim nginx.conf
worker_processes 1;
error_log logs/error.log error;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
include vhosts/*.conf;
}
(adsbygoogle = window.adsbygoogle || []).push({});