nginx配置之錯誤和訪問日志功能


錯誤日志功能:logs/error.log

    nginx.conf中       

#error_log logs/error.log; 

#error_log logs/error.log notice; 

#error_log logs/error.log info; 

#error_log "pipe:rollback logs/error_log interval=1d baknum=7 maxsize=2G"; 

訪問日志功能:logs/access.log

    nginx.conf中的http{}中:      

#log_format main '\$remote_addr - \$remote_user [\$time_local] "\$request" '

 

# '\$status \$body_bytes_sent "$http_referer" '

 

# '"\$http_user_agent" "\$http_x_forwarded_for"'; 

 

#access_log logs/access.log main;

 

#access_log "pipe:rollback logs/access_log interval=1d baknum=7 maxsize=2G" main;

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM