首页 > 代码库 > nginx+fpm反向代理zabbix

nginx+fpm反向代理zabbix

其实zabbix的gui控制面板就是php,遇到403,去掉 localhost 后面的zabbix,还解决不了?把/usr/share/zabbix剪切到/var/www/zabbix,然后给相应的权限,其他问题,修改php.ini就ok

sudo vi /etc/nginx/sites-enabled/zabbix 

server{


    listen 80;
    server_name www.example.com example.com;
    root /usr/share/zabbix;

    access_log /var/log/nginx/zabbix.access.log;
    error_log /var/log/nginx/zabbix.error.log;

    location / {
            
            index index.php;
            access_log off; 
            location ~ \.php$ {
               
		fastcgi_pass   unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                include        fastcgi_params;
             }
        }


}