Securing phpmyadmin: non-standard port + https
- by elect
Trying to secure phpmyadmin, we already did the following:
Cookie Auth login
firewall off tcp port 3306.
running on non-standard port
Now we would like to implement https... but how could it work with phpmyadmin running already on a non-stardard port?
This is the apache config:
# PHP MY ADMIN
<VirtualHost *:$CUSTOMPORT>
Alias /phpmyadmin /usr/share/phpmyadmin
<Directory /usr/share/phpmyadmin>
Options FollowSymLinks
DirectoryIndex index.php
<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>
</Directory>
# Disallow web access to directories that don't need it
<Directory /usr/share/phpmyadmin/libraries>
Order Deny,Allow
Deny from All
</Directory>
<Directory /usr/share/phpmyadmin/setup/lib>
Order Deny,Allow
Deny from All
</Directory>
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/phpmyadmin.log combined
</VirtualHost>