Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Database Server
  • Search

Limit phpmyadmin htaccess

Questions regarding the Database Server
MySQL, PostgreSQL, MariaDB, Percona Server, phpMyAdmin, phpPgAdmin
Post Reply
  • Print view
Advanced search
4 posts • Page 1 of 1
mihacb
Posts: 15
Joined: Mon Feb 24, 2020 4:43 pm

Os: CentOS 6x
Web: apache + nginx
Limit phpmyadmin htaccess
  • Quote

Post by mihacb » Tue Mar 10, 2020 12:08 am

Hello friends! In order to limit access to phpmyadmin from outside, only from vesta panel.
I made .htaccess in folder /usr/share/phpMyAdmin

Code: Select all

RewriteEngine On
RewriteCond %{HTTP_REFERER} !()?site.ru
RewriteRule .* - [F]
From Vesta i can go to site.ru/phpmyadmin/ - it's ok,

- but when i try to log in to the base, i have:
Forbidden
You don't have permission to access /phpmyadmin/index.php on this server.
I think it is due to HTTP_REFERER doesn't transmit to index.php script

Does anybody know, how to fix it?
Top

skamasle
Collaborator
Posts: 592
Joined: Mon Feb 29, 2016 6:36 pm

Re: Limit phpmyadmin htaccess
  • Quote

Post by skamasle » Sun May 10, 2020 7:32 pm

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
Top

mihacb
Posts: 15
Joined: Mon Feb 24, 2020 4:43 pm

Os: CentOS 6x
Web: apache + nginx
Re: Limit phpmyadmin htaccess
  • Quote

Post by mihacb » Fri Jun 12, 2020 11:24 pm

skamasle wrote: ↑
Sun May 10, 2020 7:32 pm
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
Thank you for your reply! Could you write the necessary code and in which files i need it change?
Top

skamasle
Collaborator
Posts: 592
Joined: Mon Feb 29, 2016 6:36 pm

Re: Limit phpmyadmin htaccess
  • Quote

Post by skamasle » Mon Jun 15, 2020 9:12 pm

mihacb wrote: ↑
Fri Jun 12, 2020 11:24 pm
skamasle wrote: ↑
Sun May 10, 2020 7:32 pm
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
Thank you for your reply! Could you write the necessary code and in which files i need it change?
HI, I cant help you, I not control the PHP part
Top


Post Reply
  • Print view

4 posts • Page 1 of 1

Return to “Database Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

cron

Login  •  Register

I forgot my password