首页 IT正文

Typecho 1.0 Nginx 提示access denied的解决办法。

admin IT 2017-09-02 862 0

使用Nginx驱动typecho,刚安装后可以看到首页却不能访问管理登录或伪静态页面,找了好多方法包括修改:/usr/local/php/etc/php-fpm.conf  在后面加上一行:security.limit_extensions = .php .asmx .html .js .css .jpg .jpeg .gif .png .htm。可是页面还不正常,按照这个blog修改了nginx配置后,问题解决。然后却发现,输入用户名密码后提示Access denied.提示cgi.fix_pathinfo应该为1,在/etc/php5/fpm/php.ini中修改完毕。最后,重启php5-fpm和nginx服务,便可以正确登录管理页面。


原文:

Finally fixed it.

The culprit was this line in my config:

fastcgi_param   PATH_TRANSLATED     $document_root$fastcgi_path_info;

If I commented this line, everything worked fine. However I saw this in almost every post I read about Nginx configs, so it bothered me. When looking at my configs for the millionth time, I saw that cgi.fix_pathinfo (in php.ini) was set to 0, where it should have been 1. The default value PHP uses is also 1, so I must have changed this in my debugging hours, because I remember reading about this value, and thought it was set correct.

Anyway, maybe it helps anyone Googling for this issue.


本文标题:Typecho 1.0 Nginx 提示access denied的解决办法。
本文链接:https://xl.cndyun.com/post/146.html
作者授权:除特别说明外,本文由 admin 原创编译并授权 小龙的博客 刊载发布。
版权声明:本文不使用任何协议授权,您可以任何形式自由转载或使用。
«    2024年3月    »
123
45678910
11121314151617
18192021222324
25262728293031

分享:

支付宝

微信