Ngxin .conf 配置文件
#START-SITE
server {
listen 80;
server_name xxx.xxx.com;
access_log logs/xxx.xxx.com.access.log;
set $root D:/wwwroot/thinkphp5/public;
location ~ .*\.(gif|jpg|jpeg|bmp|png|ico|txt|js|css)$
{
root $root;
}
root $root;
index index.php index.html index.htm;
location @rewrite {
rewrite ^(.*)$ index.php/$1 last;
}
location /{
if ( !-e $request_filename) {
rewrite ^(.*)$ /index.php/$1 last;
break;
}
}
location ~ \.php {
root $root;
fastcgi_pass 127.0.0.1:4570;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $root$fastcgi_script_name;
include fastcgi_params;
}
#END-PHP
}
#END-SITE