
Sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/apache.key -out /etc/apache2/ssl/apache.crt We are going to be passing sensitive data between the web interface and the server, so we need to set up SSL in order to make sure our data is not sent in plain text.įirst, tell Apache to enable SSL support and restart the server to implement the change with the following commands: sudo a2enmod sslĬreate a directory to store our SSL certificates, and then create a key and cert with the following commands: sudo mkdir /etc/apache2/ssl Now, restart Apache to enable the access restrictions: sudo service apache2 restart How to Set Up SSL with PhpMyAdmin You will be asked to choose a password for the new user. Substitute the username you would like to use: sudo htpasswd -c /etc/phpmyadmin/.htpasswd user_name We can create that file and a login account with the following command. This change makes our site look in "/etc/phpmyadmin/.htpasswd" for a list of valid login credentials. Insert the following text into the file: AuthType Basic htaccess file: sudo nano /usr/share/phpmyadmin/.htaccess Under the line that reads "DirectoryIndex index.php", insert a line that reads "AllowOverride All": Open the phpMyAdmin apache configuration file with root privileges: sudo nano /etc/phpmyadmin/nf This will require a password login prior to accessing the phpMyAdmin interface.įirst, configure phpMyAdmin apache configuration to allow the use of. The first step in securing phpMyAdmin is to set up. These are just warnings and can be safely ignored. You may get a message that reads: The Alias directive in /etc/phpmyadmin/nf at line 3 will probably never match because it overlaps an earlier Alias.Īpache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName Restart the server for the changes to take affect: sudo service apache2 restart Scroll to the bottom of the file and type the following directive to make Apache read the phpMyAdmin specific configuration file: Include /etc/phpmyadmin/nf Tell Apache to source the phpMyAdmin configuration in order to allow access to the application.Įdit the main Apache configuration file with root privileges: sudo nano /etc/apache2/nf Select "Yes" to allow the phpMyAdmin database to be configured automatically.Įnter the password you set up for the root MySQL user during installation, and then assign a password for the phpMyAdmin process to use to log in. Select "Apache2" as the server to configure during installation. Install using this command: sudo apt-get install phpmyadmin Ubuntu 12.04 includes phpMyAdmin in its default repositories. Log into your server and continue when ready.

Follow this guide to install Apache, MySQL, and PHP on Ubuntu 12.04 if you haven't already set this up. This guide assumes that you have root access to an Ubuntu 12.04 server, and that you have already configured LAMP. This guide will cover how to install phpMyAdmin on a LAMP (Linux, Apache, MySQL, and PHP5) stack on an Ubuntu 12.04 machine using SSL and access restrictions. You can set up this software to manage the data on your VPS remotely without shell access.Īlthough phpMyAdmin is useful, it can also be insecure if not configured correctly.

PhpMyAdmin is a web-based frontend used to easily administer MySQL databases in a visually friendly way. You can use the search functionality at the top of the page to find a more recent version. If available, we strongly recommend using a guide written for the version of Ubuntu you are using. This guide might still be useful as a reference, but may not work on other Ubuntu releases. Reason: Ubuntu 12.04 reached end of life (EOL) on Apand no longer receives security patches or updates. Migrate the server data to a supported version.Upgrade from Ubuntu 14.04 to Ubuntu 16.04.If you are currently operate a server running Ubuntu 12.04, we highly recommend upgrading or migrating to a supported version of Ubuntu: This article covers a version of Ubuntu that is no longer supported.
