server{
listen 80;
server_name tp5.cn;
index index.html index.htm index.php default.html default.htm default.php;
root D:/phpStudy/PHPTutorial/WWW/tp5/public;
charset utf-8;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
location / {
try_files $uri $uri/ /index2.php?_url=$uri&$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index /index2.php;
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
access_log D:/phpStudy/PHPTutorial/WWW/wwwlogs/tp5.log;
error_log D:/phpStudy/PHPTutorial/WWW/wwwlogs/bd_error.log;
}
listen 80;
server_name tp5.cn;
index index.html index.htm index.php default.html default.htm default.php;
root D:/phpStudy/PHPTutorial/WWW/tp5/public;
charset utf-8;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=$1 last;
break;
}
location / {
try_files $uri $uri/ /index2.php?_url=$uri&$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index /index2.php;
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
access_log D:/phpStudy/PHPTutorial/WWW/wwwlogs/tp5.log;
error_log D:/phpStudy/PHPTutorial/WWW/wwwlogs/bd_error.log;
}
肤
选择风格关闭