location /phpMyAdmin {
	root /usr/local/psa;
	index index.php;

	location ~* /phpMyAdmin/(libraries|templates|config\.)(.*) {
		deny all;
	}

	location ~* /phpMyAdmin/(.*)\.php$ {
		include /etc/sw-cp-server/fastcgi_params;
		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
		fastcgi_pass unix:/var/run/sw-engine.sock;
	}
}

rewrite (?i)^/phpMyAdmin(.*) /phpMyAdmin$1 last;
