在nginx的配置文件中,修改nginx的配置:
在目錄\tfcms\public\thinkcmf.conf下有thinkcmf.conf配置文件伦吠,打開文件查看內(nèi)容如下:
# 本文件是nginx的配置文件。
# 根據(jù)需要修改下面的域名與目錄
# 通常放置在/etc/nginx/conf.d下
server {
listen 80;
#域名設(shè)置
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目錄下。