VPS侦探论坛
标题: lnmp1.4下typecho404页面不生效 [打印本页]
作者: JohnChiu 时间: 2017-8-1 22:08
标题: lnmp1.4下typecho404页面不生效
就是目前lnmp1.4环境,但是typecho的自定义404页面没有效果,甚至不会显示nginx的404页面,只会提示:
找不到 blog.dearjohn.cn 的网页找不到与以下网址对应的网页
是不是跟vhost的conf有关?麻烦军哥看一下~ 另外同一个服务器上的wordpress站点就没有这个问题~
- server
- {
- listen 80;
- #listen [::]:80;
- server_name blog.dearjohn.cn ;
- index index.html index.htm index.php default.html default.htm default.php;
- root /home/wwwroot/typecho;
- include typecho.conf;
- #error_page 404 /404.html;
- # Deny access to PHP files in specific directory
- #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }
- include enable-php.conf;
- location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
- {
- expires 30d;
- }
- location ~ .*\.(js|css)?$
- {
- expires 12h;
- }
- location ~ /.well-known {
- allow all;
- }
- location ~ /\.
- {
- deny all;
- }
- access_log off;
- }
复制代码
作者: JohnChiu 时间: 2017-8-2 08:57
对了,同样的conf在lnmp1.3下没有问题,1.3加上include enable-php-pathinfo.conf;才能伪静态,但是404都正常跳转的,1.4不加pathinfo也能伪静态,但不论加不加都无法正常跳转404~
可能是1.4的bug吗?
作者: licess 时间: 2017-8-2 12:21
http://docs.typecho.org/themes/custom-404
1.3和1.4的虚拟主机配置文件上没区别
| 欢迎光临 VPS侦探论坛 (https://bbs.lnmp.com/) |
Powered by Discuz! X3.4 |