nginx配置支持thinkcmf的pathinfo模式

在nginx的配置文件中,修改nginx的配置:
在目录\tfcms\public\thinkcmf.conf下有thinkcmf.conf配置文件,打开文件查看内容如下:

# 本文件是nginx的配置文件。
# 根据需要修改下面的域名与目录
# 通常放置在/etc/nginx/conf.d下

server {
        listen       80;
        #域名设置
        server_name  thinkcmf.com;
        #项目目录
        root         /www/thinkcmf/public;

        index index.php;

        location / {

            if (!-e $request_filename) {

                rewrite  ^(.*)$  /index.php?s=$1  last;

                break;
            }
        }
        location ~ .php$ {
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include fastcgi_params;
        }
    }

将该配置文件放置到nginx的conf.d目录下。

你可能感兴趣的:(nginx配置支持thinkcmf的pathinfo模式)