aquaballoon

How To Install and Secure phpMyAdmin on Ubuntu 12.04

Dec 23rd, 2013
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.83 KB | None | 0 0
  1. https://www.digitalocean.com/community/articles/how-to-install-and-secure-phpmyadmin-on-ubuntu-12-04
  2.  
  3.  
  4. Install phpMyAdmin
  5.  
  6. $ sudo apt-get install phpmyadmin
  7.  
  8. $ sudo nano /etc/apache2/apache2.conf
  9. Include /etc/phpmyadmin/apache.conf
  10.  
  11. $ sudo service apache2 restart
  12.  
  13. youripaddress/phpmyadmin
  14.  
  15. Security
  16.  
  17. $ sudo nano /etc/phpmyadmin/apache.conf
  18.  
  19. <Directory /usr/share/phpmyadmin>
  20.         Options FollowSymLinks
  21.         DirectoryIndex index.php
  22.         AllowOverride All
  23.         [...]
  24.  
  25. Configure the .htaccess file
  26.  
  27.  $ sudo nano /usr/share/phpmyadmin/.htaccess
  28.  
  29. AuthType Basic
  30. AuthName "Restricted Files"
  31. AuthUserFile /path/to/passwords/.htpasswd
  32. Require valid-user
  33.  
  34. Create the htpasswd file
  35.  
  36. $ sudo htpasswd -c /path/to/passwords/.htpasswd username
  37.  
  38.  
  39. Finish up by restarting apache:
  40.  
  41. $ sudo service apache2 restart
Advertisement
Add Comment
Please, Sign In to add comment