jueves, 30 de junio de 2016

Permitir phpmyadmin en un rango de red en Debian 8 (Jessie)


Editamos la config del apache:

root@miServer:/# vi /etc/phpmyadmin/apache.conf

Agregamos en rojo lo siguiente en el lugar indicado:

# phpMyAdmin default Apache configuration

Alias /phpmyadmin /usr/share/phpmyadmin


    AllowOverride All  <==== Agregar esto acá
    Options FollowSymLinks
    DirectoryIndex index.php

   
       
            AddType application/x-httpd-php .php
       
       
            SetHandler application/x-httpd-php
       


Creamos el .htacces en la siguiente ruta:

root@miServer:/# vi /usr/share/phpmyadmin/.htaccess

Y agregamos lo siguiente:

deny from all
allow from 127.0.0.1
allow from 192.168.1.0/255.255.255.0    <== Denegamos todo menos esta red 


Reiniciamos el apache:

root@miServer:/# /etc/init.d/apache2 reload


Y vemos que accediendo al sitio nos aparece lo siguiente:




No hay comentarios: