nginx 安装 thinkphp5 配置

寵の児 提交于 2019-11-28 04:10:05

nginx.conf

server {
    listen       80;
    server_name s.huailaixx.com;
    charset utf-8;

    location ~ \.php {
        root   /data0/www/test_hlxx/public;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;

        fastcgi_split_path_info  ^((?U).+\.php)(/?.+)$; 
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;


        fastcgi_param  PATH_INFO  $fastcgi_path_info;                                    
        fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;
        include        fastcgi_params;
    }

    location / {
        root   /data0/www/test_hlxx/public;
        index  index.html index.htm index.php;

        if (!-e $request_filename) {
            rewrite ^/(.*)$ /index.php/$1 last;  
            break;
        }
    }
}

php.ini

cgi.fix_pathinfo=1

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!