在文件夹下: server\nginx\conf\vhosts.conf
server {
listen 80;
server_name yrd.com; //域名
charset utf-8;
#access_log logs/host.access.log main;
root E:\lav\blog\public; //项目地址
index index.php index.html;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ \.php$ {
fastcgi_pass fastcgi_backend;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
}
下载附件:
https://pan.baidu.com/s/1W3I425lmQS4-gqGq7oFqRA 密码: 4egw