# Alias for phpMyAdmin directory
alias.url += ( 
	"/phpmyadmin" => "/usr/share/phpmyadmin",
)

# Disallow access to libraries
$HTTP["url"] =~ "^/phpmyadmin/templates" { 
    url.access-deny = ( "" ) 
}
$HTTP["url"] =~ "^/phpmyadmin/libraries" { 
    url.access-deny = ( "" ) 
}
$HTTP["url"] =~ "^/phpmyadmin/setup/lib" { 
    url.access-deny = ( "" ) 
}

# Limit access to setup script
$HTTP["url"] =~ "^/phpmyadmin/setup" {
	auth.backend = "htpasswd"
	auth.backend.htpasswd.userfile = "/etc/phpmyadmin/htpasswd.setup"
	auth.require = (
		"/" => (
			"method" => "basic",
			"realm" => "phpMyAdmin Setup",
			"require" => "valid-user"
		)
	)
}


