nginx: [emerg] unknown log format "proxy_log" in /usr/local/nginx/conf/nginx.conf:117
打开nginx.conf,"main"错误是因为丢失了log_format选项,之前把它屏蔽掉了,修改之后问题解决。
user www www;
pid /var/log/nginx/nginx.pid;
worker_processes 8;
worker_rlimit_nofile 1024;
events {
worker_connections 2048;
use epoll;
}
http {
user www;
worker_processes 2;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
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;
}
很赞哦! ( 0 )