标签:错误日志 路径 logs nec access ESS Nginx访问日志 log error
1、定义NGINX错误日志worker_processes 1;
events {
worker_connections 1024;
}
error_log logs/error.log; #定义日志路径,默认级别为error,配置位置main体里
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
include vhost/*.conf;
}
worker_processes 1;
events {
worker_connections 1024;
}
error_log logs/error.log;
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
log_format main ‘$remote_addr - $remote_user [$time_local] "$request" ‘ #只允许在http模块里配置,此格式为默认定义
‘$status $body_bytes_sent "$http_referer" ‘
‘"$http_user_agent" "$http_x_forwarded_for"‘;
access_log logs/access.log main; #日志存放路径与使用的格式
include vhost/*.conf;
}
请参考:http://ibm.chick.blog.163.com/blog/static/144201610201621135441819/
标签:错误日志 路径 logs nec access ESS Nginx访问日志 log error
原文地址:http://blog.51cto.com/12965094/2144995