Nginx配置规则错误:unknown log format "main"
- 时间:
- 浏览:673
- 来源:无双科技
网站配置由apche换成nginx系统后,重启时出现错误提示
Nginx配置规则错误:
nginx: [emerg] unknown log format "main" in /www/server/panel/vhost/nginx/www.caishui1688.com.conf:97
nginx: configuration file /www/server/nginx/conf/nginx.conf test failed
解决办法
打开nginx.conf,"main"错误是因为丢失了log_format选项,因为之前做过CDN获取真实IP,后来这个删除了,将log_format添加上去后问题解决
log_formatmain'$remote_addr - $remote_user [$time_local] "$request" ''$status $body_bytes_sent "$http_referer" ''"$http_user_agent" "$http_x_forwarded_for"';
猜你喜欢