thinkcmf安装遇到的问题【服务器rewrite】未开启

thinkcmf5.1的下载

链接:https://pan.baidu.com/s/17BikltE-zOVoJbrSgwI6lQ
提取码:48wi

 

1、将thinkcmf5.1的文件全部解压后,放到 D:\phpstudy_pro\WWW\thinkcmf 文件夹下面;安装目录设置到 thinkcmf/public下面去的;

 

 

 

 

2.打开phpstudy,设置->配置文件,选择对应的.conf设置文件,

 

 

 复制下面的代码,替换cmf.im_80内容代码;注意 root "D:/project/thinkcmf/public";

 

server {
        listen        80;
        server_name  cmf.im;
        root   "D:/project/thinkcmf/public";
        location / {
                index  index.html index.htm index.php;
                    #主要是这一段一定要确保存在
                    if (!-e $request_filename) {
                        rewrite  ^(.*)$  /index.php?s=/$1  last;
                        break;
                    }
                    #结束

                #列出目录
                autoindex  on;
            }
        location ~ \.php(.*)$ {
            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;
        }
}

 

 3。再进行下一步,输入数据库的账号和密码,安装thinkcmf即可

 

 

 

查看 https://www.thinkcmf.com/doc5_1.html 

5.1文档->基础->安装thinkcmf5.1->

nginx配置参考

 

posted @ 2020-07-11 11:56  千机楼  阅读(1999)  评论(0编辑  收藏  举报