语法:error_log file level ; # error_log 是关键字,file 是保存错误日志的文件路径,level 是错误日志级别html
位置:错误日志能够配置在 Main 区块,也能够配置在虚拟主机配置文件中nginx
日志级别:debug | info | notice | warn | error | crit | alert | emerg ,级别越高,记录的信息越少vim
[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; }