Reputation: 285
I have a VPS server from digitalocean. It is running on ubuntu 13.10 64 bit o with apache 2.4, PHP 5 and mysql 5.5
I've installed phpmyadmin. I want to access it through only ip address. I mean 12.34.56.789/pma
but the thing is that I've set up two virtual hosts domain and www.domain so if I go to domain/pma
and www.domain/pma
it allows me to access phpmyadmin which I don't want to allow. So any suggestion friends? Here is my /etc/phpmyadmin/apache.conf
file's codes.
# phpMyAdmin default Apache configuration
Alias /pma /usr/share/phpmyadmin
<Directory /usr/share/phpmyadmin>
Options FollowSymLinks
DirectoryIndex index.php
AllowOverride All
So how to allow access to phpmyadmin from only ip address?
Upvotes: 1
Views: 5134
Reputation: 913
Put your alias /pma into the default virtual host. It might look like:
<VirtualHost *:80>
DocumentRoot /var/www
<Directory /var/www >
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Alias /pma /usr/share/phpmyadmin
<Directory /usr/share/phpmyadmin>
Options FollowSymLinks
DirectoryIndex index.php
AllowOverride All
</Directory>
</VirtualHost>
Upvotes: 3