首页 养生问答 疾病百科 养生资讯 女性养生 男性养生

Nginx的配置问题

发布网友

我来回答

1个回答

热心网友

这个貌似只要定向到 index.php 就 OK 了吧。
关键是你框架的 Router 类够强壮,nginx.conf 里面基本不用多写啥的

location / {
index index.php;
if (!-f $request_filename){
rewrite ^/(.+)$ /index.php?$1& last;
}
}

location ~ .*\.php?$ {
fastcgi_pass 127.0.0.1:3333;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}追问你这么坑你家里人知道吗?

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com