目录

问题:

安装成功后,打开首页的文章页面、关于页面,或者在后台界面输入账号密码点击登录,都报404 Not Found错误。

解决办法:

在/usr/local/nginx/conf/vhost/下找到你的typecho站点配置文件(文件名类似xxxxx.conf),然后:

1、确保有“include typecho.conf;”这么一行,并且没有被“#”号注释;

2、用“#”号注释“try_files $uri =404;”这一行;

3、取消“#include pathinfo.conf;”这一行前面的的“#”号;

修改正确的话,typecho站点conf配置文件看起来如下:

include typecho.conf;  
#error_page   404   /404.html;  
location ~ [^/]\.php(/|$)  
    {  
        # comment try_files $uri =404; to enable pathinfo  
        #try_files $uri =404;  
        fastcgi_pass  unix:/tmp/php-cgi.sock;  
        fastcgi_index index.php;  
        include fastcgi.conf;  
        include pathinfo.conf;  
    }

4、重启nginx或lnmp:

# service nginx restart  

或者重启lnmp也行:

# /root/lnmp restart  

5、打开你的typecho站点文章页或者登录管理页面,验证问题是不是已经解决了!