腾讯云服务器优惠活动华纳云香港服务器

Typecho Nginx点击前台链接或后台登录出现404解决方法

一般的出现这种情况时,nginx.conf 里的的 location 设置都是类似这样

location ~ .*\.php$

要支持 pathinfo,要改成

location ~ .*\.php(\/.*)*$

Typecho nginx 服务器无法实现伪静态化,在后台设置不成功

这主要是 nginx 的 rewrite 没有设置导致的,在 nginx.conf 里找到网站的 server 配置段,一般我们推荐如下的配置

server {
listen 80;
server_name blog.siddim.com;
root /data/htdocs/www/;
index index.html index.htm index.php;

if (!-e $request_filename) {
rewrite ^(.*)$ /index.php$1 last;
}

location ~ .*\.php(\/.*)*$ {
include fastcgi.conf;
fastcgi_pass 127.0.0.1:9000;
}

}
赞 (0) 打赏
版权声明:本文为转载文章,来源于 siddim的网络日志 ,版权归原作者所有!发布此文是出于传递更多信息之目的,若有来源标注错误或侵犯了您的合法权益,请联系我们,确认后马上更正或删除,谢谢!
wu