解决错误:nginx: [emerg] unknown log format “main” in

文章
解决错误:nginx: [emerg] unknown log format “main” in-下一朵云

重启nginx是出现了如下错误:

nginx: [emerg] unknown log format “main” in /usr/local/nginx/nginx.conf:124

解决办法:

打开nginx.conf,”main”错误是因为丢失了log_format选项,默认把他屏蔽掉了,修改之后问题解决

解决错误:nginx: [emerg] unknown log format “main” in-下一朵云
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;

版权声明:本文为下一朵云发布文章,转载请附上原文出处链接和本声明。
本文链接:https://www.orcy.net.cn/1418.html

​ 广告:HCIE-Security认证课程辅导资料(付费)

暂无评论

发表评论

电子邮件地址不会被公开。 必填项已用*标注