# ::maintainer::

# phpMyAdmin Apache configuration


# note: use "mysql" instead of "phpmyadmin" for adding some sloppy security

Alias /mysql ::mysql.phpmyadmin_dir::

<Directory ::mysql.phpmyadmin_dir::>
	Options Indexes FollowSymLinks
	DirectoryIndex index.php
	#[ku]
	AllowOverride None

	Order Deny,Allow
	Deny from All
-ku-temp-tag-for-inserting-allow-ku-

	# Authorize for setup
	<Files setup.php>
	    # For Apache 1.3 and 2.0
	    <IfModule mod_auth.c>
		AuthType Basic
		AuthName "phpMyAdmin Setup"
		AuthUserFile /etc/phpmyadmin/htpasswd.setup
	    </IfModule>
	    # For Apache 2.2
	    <IfModule mod_authn_file.c>
		AuthType Basic
		AuthName "phpMyAdmin Setup"
		AuthUserFile /etc/phpmyadmin/htpasswd.setup
	    </IfModule>
	    Require valid-user
	</Files>
	<IfModule mod_php4.c>
		AddType application/x-httpd-php .php

		php_flag magic_quotes_gpc Off
		php_flag track_vars On
		php_flag register_globals Off
		php_value include_path .
	</IfModule>
	<IfModule mod_php5.c>
		AddType application/x-httpd-php .php

		php_flag magic_quotes_gpc Off
		php_flag track_vars On
		php_flag register_globals Off
		php_value include_path .
	</IfModule>

	#[ku]
	php_value memory_limit ::mysql.php_memory_limit::

	# [ku] redirige obbligatoriamente su https
	#
	<IfModule mod_rewrite.c>
		RewriteEngine	On
		RewriteCond     %{SERVER_PORT} ^80$
		#RewriteRule	^(.*) https://%{SERVER_NAME}/$1 [R,L]
		RewriteRule	^(.*) https://%{SERVER_NAME}/mysql
	</IfModule>

</Directory>

