Ad Widget

Collapse

Can't login in web UI running on Nginx+PHP-FPM

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • avi9526
    Junior Member
    • May 2014
    • 2

    #1

    Can't login in web UI running on Nginx+PHP-FPM

    Zabbix from Ubuntu 14.04 repositories was used (I tried to test web UI from latest version and it's has same problem). No errors was reported while setup. But I can access web UI only as guest. Error form displayed with options to login and view dashboard as guest. The problem is login option doesn't show login form, instead it's lead to same error message…

    Part of Nginx config:
    Code:
    location "/zabbix/"
    {
    	index		index.php index.html;
    	try_files	$uri $uri/	/zabbix/index.php;
    	alias		"/usr/share/zabbix/";
    	
    	auth_basic	"Authorization required to access Zabbix";
    	auth_basic_user_file	htpasswd;
    }
    
    location ~* "/zabbix/(api|conf|include)((/.*)?)$"
    {
    	deny all;
    	return 404;
    }
    
    location ~ "^/zabbix/(.+?\.php)(/.*)?$"
    {
    	root		"/usr/share/zabbix/";
    	try_files	$1 $uri $uri/	/zabbix/index.php;
    	rewrite		"^/zabbix/(.+?\.php)(/.*)?$"	/$1$2		break;
    	
    	auth_basic	"Authorization required to access Zabbix";
    	auth_basic_user_file	htpasswd;
    	
    	# PHP-FPM Settings
    	include		avi9526/php-fpm;
    }
    and "avi9526/php-fpm"
    Code:
    fastcgi_pass	php-fpm;
    
    include fastcgi_params;
    fastcgi_split_path_info			^(.+?\.php)(/.*)?$;
    
    fastcgi_param	SCRIPT_FILENAME		$document_root$fastcgi_script_name;
    fastcgi_param	PATH_TRANSLATED		$document_root$fastcgi_script_name;
    
    set		$path_info		$fastcgi_path_info;
    fastcgi_param	PATH_INFO		$path_info;
    
    fastcgi_param	SERVER_ADMIN		[email protected];
    fastcgi_param	SERVER_SIGNATURE	nginx/$nginx_version;
    fastcgi_index	index.php;
    Attached Files
  • enzorik
    Member
    • Feb 2014
    • 37

    #2
    Dear, have you tried to check this file?

    Code:
    auth_basic_user_file	htpasswd;
    What about some log files?

    Btw, installation from "repositories" - not clear solution.
    If you want have a stable and good working instance, install Zabbix from sources.
    There is well done manual for doing this:

    Comment

    Working...