Created
March 10, 2013 17:01
-
-
Save digitup/5129422 to your computer and use it in GitHub Desktop.
Server - Secure phpMyAdmin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//install phpmyadmin | |
sudo apt-get install phpmyadmin | |
//After the installation has completed, add phpmyadmin to the apache configuration. | |
sudo nano /etc/apache2/apache2.conf | |
//add phpmyadmin to config file | |
Include /etc/phpmyadmin/apache.conf | |
//restart apache | |
sudo service apache2 restart | |
//security | |
//Set Up the .htaccess File | |
sudo nano /etc/phpmyadmin/apache.conf | |
//Under the directory section, add the line “AllowOverride All” under “Directory Index”, making the section look like this: | |
<Directory /usr/share/phpmyadmin> | |
Options FollowSymLinks | |
DirectoryIndex index.php | |
AllowOverride All | |
[...] | |
//Configure the .htaccess file | |
sudo nano /usr/share/phpmyadmin/.htaccess | |
AuthType Basic | |
AuthName "Restricted Files" | |
AuthUserFile /path/to/passwords/.htpasswd | |
Require valid-user | |
//Create the htpasswd file | |
sudo htpasswd -c /path/to/passwords/.htpasswd username | |
sudo service apache2 restart | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment