Installing phpmyadmin on ubuntu

September 6, 2011

Installing phpmyadmin on ubuntu


This post explains how to install and configure phpmyadmin on ubuntu or debian systems.

Install phpmyadmin using apt-get
#apt-get install phpmyadmin

Copy the phpmyadmin apache configuration file to /etc/apache2/conf.d/
#cp /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/
Or
You can include the configuration file in apache2.conf by adding this line to it
Include /etc/phpmyadmin/apache.conf

No restart apache
#/etc/init.d/apache2 restart

Sometimes you may have to add a blowfish secret to accept cookies.
#vi /var/lib/phpmyadmin/blowfish_secret.inc.php
$cfg['blowfish_secret'] = 'a8b7dafdferHJHJ^&U^45776TIUuiYc6d';
 

How to block or allow ips using .htaccess

September 6, 2011

How to block or allow ips using .htaccess


Suppose you have a site abc.com and in the document root directory of abc.com you have a directory "admin" in which you want to restrict the access to others. But you want to give access to clients from some ips. 

You can do this by creating a .htaccess file under "admin" directory.

.htaccess file can be like this. 

Order Deny,Allow
Deny from all
Allow from IP_address1
Allow from IP_address2
Allow from IP_address3
Allow from IP_address4
Allow from IP_address5

th...

Continue reading...
 

Recent Posts