Limit phpmyadmin htaccess
Limit phpmyadmin htaccess
Hello friends! In order to limit access to phpmyadmin from outside, only from vesta panel.
I made .htaccess in folder /usr/share/phpMyAdmin
From Vesta i can go to site.ru/phpmyadmin/ - it's ok,
- but when i try to log in to the base, i have:
Does anybody know, how to fix it?
I made .htaccess in folder /usr/share/phpMyAdmin
Code: Select all
RewriteEngine On
RewriteCond %{HTTP_REFERER} !()?site.ru
RewriteRule .* - [F]
- but when i try to log in to the base, i have:
I think it is due to HTTP_REFERER doesn't transmit to index.php scriptForbidden
You don't have permission to access /phpmyadmin/index.php on this server.
Does anybody know, how to fix it?
Re: Limit phpmyadmin htaccess
This not works, because you are referer only first time, once you are in login page your access is direct
The better way to do this, is modify index.php and handle session from vestacp
The better way to do this, is modify index.php and handle session from vestacp
Re: Limit phpmyadmin htaccess
Thank you for your reply! Could you write the necessary code and in which files i need it change?