Installing phpMyAdmin securely on Centos, RedHat or Fedora

1. Make sure that you can access your server securely

If you cannot access your server securely, let’s go and setup SSL on your server.

Again, I assume you are using a REDHAT based distribution.

  • Find if OpenSSL is running: “openssl version”
  • If OpenSSL is not running just install it with Yum : “yum install openssl”

Install a certificate by following the instructions in the following website:

(I wanted to write an article about SSL but this websites does a good job)

Your website should now be secure then it is time to install phpMyAdmin.

2. Unzip your phpMyAdmin to your virtual directory

Then browse to the virtual directory. or wherever you put it.

Use the setup script to help you set up the config file;

Personally I do not like the setup script; I like to edit the config file manually.

When you done with the setup script, make sure you delete the “SETUP” folder.

3. We might also want to create a .htaccess file to force the db administrators to always access

phpMyAdmin securely.

Here is the content of the .htaccess files:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

4. Voila.


Let's share thisShare on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn