Nginx – Cannot login to zabbix web portal

nginxphp-fpmzabbix

I've managed to install Zabbix22-server on CentOS 6.x along with php-fpm and nginx. Database is MariaDB on remote, DB user's permission is set to only allow my test machine to access.

I can view the page of 127.0.0.1 but I can only see this:

login page

After clicking the "Login" button, the page is the same:

login page

What can I do to make it work as expected, so that I can login as admin?

Here are some confs:
nginx_zabbix.conf:

server {
    listen       80;
    add_header X-Frame-Options "SAMEORIGIN";

    access_log /var/log/nginx/zabbix.log;
    error_log /var/log/nginx/zabbix.err.log;

    client_max_body_size 500M;

    # This folder is a soft link to /usr/share/zabbix 
    # the permssion has been set to nginx:nginx recursively.
    root   /var/www/zabbix;

    location / {
        index  index.html index.htm index.php;
    }

    location ~ \.php$ {
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        include fastcgi.conf;
        fastcgi_param PATH_INFO $path_info;
    }
}

php-fpm is using its default values, with permission user/group set to nginx (rather than apache)

Folder /var/lib/php/session has been set to nginx:nginx with permission 770.

SELinux is set to disabled.

I've restarted everything up to this point.

Best Answer

OK, I managed to solve this one.

I changed 1 line in nginx conf file:

from

fastcgi_param PATH_INFO $path_info;

to

fastcgi_param SCRIPT_FILENAME /var/www/zabbix/$fastcgi_script_name;

and it will be fine.