Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
phpmyadmin access restriction
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
numeritos
Apprentice
Apprentice


Joined: 24 Nov 2006
Posts: 154

PostPosted: Fri Mar 02, 2007 6:55 am    Post subject: phpmyadmin access restriction Reply with quote

First of all, I'll explain what I want to do. What I want is to restrict phpmyadmin access to, for example, an IP.

I read a lot before posting here and finally got the result I wanted, but I want to know anyway why some stuff didn't work at first.

What I did was editing /etc/phpmyadmin/config.inc.php and put these lines:
Code:
$cfg['Servers'][$i]['AllowDeny']['order'] = 'allow,deny';
$cfg['Servers'][$i]['AllowDeny']['rules'] = array('allow root from IP');  //I put the IP I wanted to grant access to phpmyadmin

This didn't work and I really don't know why. I restarted apache2 to see if that helped, but it just didn't.

What I finally did was adding this to /etc/apache2/sites-enabled/000-default:
Code:
Alias /phpmyadmin/ "/usr/share/phpmyadmin/"
    <Directory "/usr/share/phpmyadmin/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from IP/255.0.0.0 ::1/128 #I put the IP I wanted to grant access to phpmyadmin
    </Directory>

This worked, but what I want to know is why the first attempt didn't.
Back to top
View user's profile Send private message
thestick
Guru
Guru


Joined: 07 Apr 2006
Posts: 531
Location: /dev/urandom

PostPosted: Fri Mar 02, 2007 8:13 am    Post subject: Reply with quote

fetch yourself a later version of pma over here http://www.phpmyadmin.net/home_page/index.php [ i assume you use the portage one] , and see if you have the same issue.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum