使用Nginx驱动typecho,刚安装后可以看到首页却不能访问管理登录页面,按照这个blog修改了nginx配置后,问题解决。然后却发现,输入用户名密码后提示Access denied.
在log中看到如下:
在log中看到如下:
2014/10/15 23:10:28 [error] 4342#0: *17 FastCGI sent in stderr: "Access to the script '/usr/share/nginx/typecho/index.php/action/login' has been denied (see security.limit_extensions)" while reading response header from upstream, client: 192.168.199.212, server: localhost, request: "POST /index.php/action/login?_=b2389d8dc2c8f5a132342d4d79d0fed6 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "192.168.199.20", referrer: "http://192.168.199.20/admin/login.php"
Google后找到这么一篇文章提示cgi.fix_pathinfo应该为1,在/etc/php5/fpm/php.ini中修改完毕。
最后,重启php5-fpm和nginx服务,便可以正确登录管理页面。