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;