开发者社区> 问答> 正文

重启nginx出现错误

拷贝 default.conf.bak为yang.conf
配置如下:



server {
        listen       80;         server_name  yang.******.cn;
        index index.html index.htm index.php;         root /alidata/www/yang;
        location ~ .*\.(php|php5)?$         {
                #fastcgi_pass  unix:/tmp/php-cgi.sock;                 fastcgi_pass  127.0.0.1:9000;
                fastcgi_index index.php;                 include fastcgi.conf;
        }         location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {                 expires 30d;
        }         location ~ .*\.(js|css)?$
        {                 expires 1h;
        }         #α¾²Ì¬¹æÔò
        include /alidata/server/nginx/conf/rewrite/default.conf;         access_log  /alidata/log/nginx/access/default.log yang;
}网址和谐
重启negix 出现nginx: [emerg] unknown log format "yang" in /alidata/server/nginx/conf/vhosts/yang.conf:23
,请各位赐教如何解决

展开
收起
thefirst 2014-05-19 20:41:18 7105 0
2 条回答
写回答
取消 提交回答
  • access_log  /alidata/log/nginx/access/default.log
    删除这一行
    2014-05-20 15:18:11
    赞同 展开评论 打赏
  • 看下报错的哪个文件!
    yang.conf 第23行。

    nginx报错,注意看下报错信息就行了。
    2014-05-20 08:30:47
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
《Nginx 代理系统常用手册》 立即下载
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载