TP3.2.3在nginx下配置502 Bad Gateway

浏览:6692 发布日期:2015/08/13 分类:求助交流 关键字: nginx 502
我在本机的wamp下没问题的,发布去nginx主机上面,只有首页能访问,打印出我home\index\index 里面的内容,其它一切都只能通过普通模式来访问,如果用pathinfo或者URL重写来访问,一律显示 502 Bad Gateway,已经配了一天,都解决不了,各种nginx配置修改方式都试个遍了还是不行,求大神指教,跪求!!!

以下附上vhost.conf的内容,vhost里面另一个server是TP3.1的,一点问题都没有server
{
    listen       80;
    server_name XXX.com;
    root  /www/XXX/;
    index index.php index.html index.htm;

    location / { 
        if (!-e $request_filename) {
            rewrite  ^(.*)$  /index.php/$1;
        }
    }    
    
    access_log off;
    
    #limit_conn   crawler  20;
    
    location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ {
        expires      30d;
        access_log off;
    }
    
    location ~ .*\.(js|css)?$ {
        expires      1h;
        access_log off;
    }
    
    location ~ \.php{
        #fastcgi_pass  unix:/tmp/php-cgi.sock;
        fastcgi_pass  127.0.0.1:9000;
        fastcgi_index index.php;
        include fastcgi.conf;
        
        set $path_info "";
        set $real_script_name $fastcgi_script_name;
        if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
            set $real_script_name $1;
            set $path_info $2;
        }
        fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
        fastcgi_param SCRIPT_NAME $real_script_name;
        fastcgi_param PATH_INFO $path_info;

        access_log    /var/my_serv/log/nginx_access.log    access;
    }

    location /status/ {
        stub_status on;
        access_log off;
    }



}
最佳答案
评论( 相关
后面还有条评论,点击查看>>