語法: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; }