Removing access to phpmyadmin from domain.com

.htaccess phpmyadmin

128 просмотра

1 ответ

From my domain anyone can get access to phpmyadmin, only thing stopping them is the login. tried to use .htaccess to redirect /phpmyadmin to 404 but won't stop it.

Heard it was possible to do from phpmyadmin.conf but not sure what to change. Any ideas?

Alias /phpmyadmin "c:/wamp/apps/phpMyAdmin-4.5.3.1/"

# to give access to phpmyadmin from outside 
# replace the lines
#
# Require local
#
# by
#
# Require all granted
#

<Directory "c:/wamp/apps/phpMyAdmin-4.5.3.1/">
   Options Indexes FollowSymLinks MultiViews
   AllowOverride all
  <IfDefine APACHE24>
    Require all granted
  </IfDefine>
  <IfDefine !APACHE24>
    Order Deny,Allow
      Allow from all
    </IfDefine>
  php_admin_value upload_max_filesize 128M
  php_admin_value post_max_size 128M
  php_admin_value max_execution_time 360
  php_admin_value max_input_time 360
</Directory>
Автор: Volcan 3 Источник Размещён: 08.11.2019 11:32

Ответы (1)


0 плюса

You can restrict the access to the Php myadmin by just whitelisting your IP so that only you will be able to get to the phpmyadmin link. Check the updated htaccess rule below.

Alias /phpmyadmin "c:/wamp/apps/phpMyAdmin-4.5.3.1/"

# to give access to phpmyadmin from outside 
# replace the lines
#
# Require local
#
# by
#
# Require all granted
#

<Directory "c:/wamp/apps/phpMyAdmin-4.5.3.1/">
   Options Indexes FollowSymLinks MultiViews
   AllowOverride all
  <IfDefine APACHE24>
    Require all granted
  </IfDefine>
  <IfDefine !APACHE24>
    Order Deny,Allow
     deny from all
     allow from <your ip> 
    </IfDefine>
  php_admin_value upload_max_filesize 128M
  php_admin_value post_max_size 128M
  php_admin_value max_execution_time 360
  php_admin_value max_input_time 360
</Directory>
Автор: error2007s Размещён: 20.08.2016 03:59
Вопросы из категории :
32x32