server {
listen 80;
server_name v.t.com;
root "F:/phpstudy_pro/WWW/project/xx/xx";
location / {
index index.php index.html;
include F:/phpstudy_pro/WWW/project/xx/videodownproject/nginx.htaccess;
autoindex off;
}
//表示statics目录下面都可以,这里可以写正则表达式
location /statics.*{
autoindex off; //是否能访问列表
}
//也可以写成这样
// location /statics{
// autoindex off; //是否能访问列表
// }
location ~ \.php(.*)$ {
fastcgi_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;
include fastcgi_params;
}
}