################################################################################
#
# Apache phpmyadmin PHP-FPM configuration file.
#
# This file lists the local configuration options for phpmyadmin in addition
# to /etc/phpmyadmin/apache.conf (which mostly concentrates on mod_php)
#
# FIXME: https://docs.phpmyadmin.net/en/latest/faq.html#faq1-38

<IfModule !mod_php7.c>
<IfModule proxy_fcgi_module>
Include	/etc/phpmyadmin/apache.conf

<Directory /usr/share/phpmyadmin>

	# No htaccess required
	AllowOverride	None

	# Allow access
	Require	all granted

	# Pass-through authorization
	CGIPassAuth	On

<IfModule ssl_module>
	# Enforce encryption -> redirect to https
	# This could also be achieved with
	#	$cfg['ForceSSL'] = true;
	# in /var/lib/phpmyadmin/config.inc.php
	# but adds a token to the URL - what's that for?!
	# PhpMyAdmin sends it's own 401 header, thus unaffected by ErrorDocument
	RewriteEngine	On
	RewriteCond	%{HTTPS}	!=on
	RewriteRule	.*		https://%{SERVER_NAME}%{REQUEST_URI}	[R=permanent,L]
</IfModule>

</Directory>
</IfModule>
</IfModule>
