Nginx 配置【求助】

浏览:508 发布日期:2016/04/05 分类:求助交流 关键字: Nginx
如何让Nginx 支持Thinkphp框架呀user www www;
server{
                listen 80;
                server_name user.xjpay.biz;
                root /home/data/wwwroot;
                index index.html index.htm index.shtml index.php;
                error_page 404 /404.html;
                location = /500.html {
                root /usr/index,html;
                }
location / {
        index  index.htm index.html index.php;
        if (!-e $request_filename) {
           rewrite  ^/(.*)$  /index.php/$1  last;
           break;
        }
    }
    location ~ \.php/?.*$ {
        root      /home/data/wwwroot;
        fastcgi_pass  unix:/tmp/php-fpm.socket;
        fastcgi_index  index.php;
        include        fastcgi_params;
    access_log logs/user.xxxx.cn.access.log main;
        set $fastcgi_script_name2 $fastcgi_script_name;
        if ($fastcgi_script_name ~ "^(.+\.php)(/.+)$") {
            set $fastcgi_script_name2 $1;
            set $path_info $2;
        }
        fastcgi_param   PATH_INFO $path_info;
        fastcgi_param   SCRIPT_FILENAME   $document_root$fastcgi_script_name2;
        fastcgi_param   SCRIPT_NAME   $fastcgi_script_name2;
    }

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