login as guest zabbix无法进入登陆界面(87)

很早之前有一位群友告知zabbix登陆不了,一直有如下提示:Access denied.Your are logged in as guest. You have no permissions to access this page.If you think this message is wrong, please consult your administrators about getting the necessary permissions.个案没多想,后来又有一位同学有这个问题,决定找出问题,很高兴群友信得过把机器开给我排查,最后找到问题,并解决问题了。

logged in as guest现象

正常登陆zabbix应该是下图:

Your are logged in as guest

但是,却出现下图:

Your are logged in as guest

解决方法

如果你是Apache用户,应该不存在此问题,如果是nginx有可能因为配置不当而出现,我们需要修改php.ini

问题根源

在zabbix php定位问题发现,zabbix是依据php文件名来设置权限,例如index.php、dashboard.php这些,如果cgi.fix_pathinfo设置为0,那么php无法获取到url请求的文件名称,例如访问index.php,获取不到index.php也定位到权限,于是出现这个错误。