Page 3 of 3

Re: [GUIDE] Secure PhpMyAdmin

Posted: Sat Dec 16, 2017 11:44 pm
by baijianpeng
Ok, finally I found the solution :

Ubuntu uses different configuration file for phpmyadmin. So I have to modify this file:

/etc/phpmyadmin/config.inc.php

and insert following code to the end of this file (just insert a new line):

Code: Select all

 $cfg['ForceSSL'] = true;
Then, restart MySQL service by:

Code: Select all

# systemctl restart mysql
[/b]

Now if you visit phpmyadmin via HTTP protocol, it will be redirected to HTTPS automatically. :-)

Re: [GUIDE] Secure PhpMyAdmin

Posted: Mon Feb 19, 2018 8:03 pm
by gospelsinger
I tried the following to allow only direct link from vesta control panel :

Code: Select all

RewriteEngine On
RewriteCond %{HTTP_REFERER} !(www.)?mydomain.com
RewriteRule .* - [F]
But I get a 500 error page. I did some research to understand the conditions here but can't get my head around them.

I did change the default /phpmyadmin to something secure to no avail.

I'm using ubuntu 16.04 and created the .htaccess in /usr/share/phpmyadmin/

Re: [GUIDE] Secure PhpMyAdmin

Posted: Sun Apr 08, 2018 6:56 pm
by sandy
for brute force protection
try this instead :
https://www.mysterydata.com/secure-phpm ... cp-centos/

Re: [GUIDE] Secure PhpMyAdmin

Posted: Thu May 10, 2018 1:09 pm
by microonline
Hello, does anyone tell me that I can apply this in nginx + php-fpm?

Thank you.

Re: [GUIDE] Secure PhpMyAdmin

Posted: Mon Aug 13, 2018 10:19 am
by canoodle
restart apach2:

Code: Select all

apachectl restart
MySQL root passwort can be found in:

Code: Select all

/root/.my.cnf
/usr/local/vesta/conf/mysql.conf