Magento2设置会破坏会话并注销

时间:2016-04-29 11:30:04

标签: php magento session nginx magento2

所以我在nginx机器上安装了Magento 2.0.5 CE。一切顺利。我现在可以登录管理面板并浏览。

但是当我访问http://example.com/setup时,它会将我重定向到../setup/index.php/session/unlogin,显示消息" Access denied。"并销毁当前会话,迫使我重新登录管理面板。即使在清除所有缓存,重新启动nginx并重复上述步骤之后,也会发生同样的情况。有点卡在这里..

2016/04/29 06:41:47 [error] 4808#0: *188 FastCGI sent in stderr: "Access to the script '/var/www/magento/setup/index.php/session/unlogin' has been denied (see security.limit_extensions)" while reading response header from upstream, client: *.*.*.246, server: example.com, request: "GET /setup/index.php/session/unlogin HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.example.com"
2016/04/29 06:41:48 [error] 4808#0: *188 FastCGI sent in stderr: "Access to the script '/var/www/magento/setup/index.php/session/unlogin' has been denied (see security.limit_extensions)" while reading response header from upstream, client: *.*.*.246, server: example.com, request: "GET /setup/index.php/session/unlogin HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "www.example.com"

尝试从

更改/etc/php5/fpm/pool.d/www.conf
; security.limit_extensions = .php .php3 .php4 .php5

security.limit_extensions = .php .php3 .php4 .php5

没有运气:(

HELP!

1 个答案:

答案 0 :(得分:0)

更改

cgi.fix_pathinfo=0

cgi.fix_pathinfo=1
php.ini里面的

解决了这个问题。但是,如果有人有更安全的解决方案,我将避免使用此选项并等待。