胤彬-2018-10-16 17:46:52
vhost 配置
server {
Listen 80;
server_name test.cn ;
root "D:ceshi888lhyun";
include "rewrite/thinkphp.conf";
索引索引.html 索引.htm 索引。 php;
#location {
#
# #autoindex on;
#}
位置 ~ .php(.*)$ {
fastc gi_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;
包括 fastcgi_params ;
}
}
thinkphp.conf
位置 / {
if (!-e $request_filename) {
重写 ^(.*)$ /index.php?s=/$1 最后;
休息;
}
}