Alias /phpmyadmin /usr/share/phpmyadmin
<Directory /usr/share/phpmyadmin>
	<IfModule itk.c>
		AssignUserID www-data www-data
	</IfModule>
	<IfModule mpm_itk_module>
		AssignUserID www-data www-data
	</IfModule>
	Order allow,deny
	Allow from all
	Options FollowSymLinks
	DirectoryIndex index.php
	<IfModule php5_module>
		AddType application/x-httpd-php .php  .php3 .php4 .php5 .phtml
		php_flag magic_quotes_gpc Off
		php_flag track_vars On
		php_flag register_globals Off
		php_admin_flag allow_url_fopen Off
		php_admin_flag engine on
		php_value include_path .
		php_admin_value upload_tmp_dir /tmp
		php_admin_value open_basedir "/usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/tmp/:/var/lib/php5/:/usr/share/php::/usr/share/doc/phpmyadmin/:/opt/php53/share/pear:/opt/php54/share/pear:/opt/php55/share/pear:/opt/php56/share/pear"
		php_admin_value session.save_path "/var/lib/php5/sessions"
		php_admin_value mbstring.func_overload 0
	</IfModule>
	<IfModule php7_module>
		AddType application/x-httpd-php .php  .php3 .php4 .php5 .phtml
		php_flag magic_quotes_gpc Off
		php_flag track_vars On
		php_flag register_globals Off
		php_admin_flag allow_url_fopen Off
		php_admin_flag engine on
		php_value include_path .
		php_admin_value upload_tmp_dir /tmp
		php_admin_value open_basedir "/usr/share/phpmyadmin/:/etc/phpmyadmin/:/var/lib/phpmyadmin/:/tmp/:/var/lib/php5/:/usr/share/php::/usr/share/doc/phpmyadmin/:/opt/php70/share/pear:/opt/php71/share/pear:/opt/php72/share/pear:/opt/php73/share/pear:/opt/php74/share/pear"
		php_admin_value session.save_path "/var/lib/php5/sessions"
	</IfModule>
	RemoveHandler .php .php3 .php4 .phtml
	<FilesMatch "\.ph(p[3-5]?|tml)$">
		SetHandler application/x-httpd-php
	</FilesMatch>
</Directory>
<Directory /usr/share/phpmyadmin/setup>
	<IfModule mod_authz_core.c>
		# Apache 2.4
		<RequireAny>
			Require all denied
		</RequireAny>
	</IfModule>
	<IfModule !mod_authz_core.c>
		# Apache 2.2
		Order Deny,Allow
		Deny from All
	</IfModule>
</Directory>
