Apache, restringir acceso

From Wiki de Caballero
Revision as of 15:15, 28 July 2014 by Camilo (talk | contribs) (Created page with "==Editar sites-enabled== <ol> <li> Ingresar por terminal a: </li> <syntaxhighlight lang='bash'> cd /etc/apache2/sites-enabled </syntaxhighlight> <br> <li> Editar el archivo '...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Editar sites-enabled

  1. Ingresar por terminal a:
  2.  
    cd /etc/apache2/sites-enabled


  3. Editar el archivo sites-enabled
  4.  
    vim sites-enbled


  5. Dentro del archivo donde dice "Deny from all" eliminar el "all" y agregar todas las ip que se desean restringir, una debajo de otra.
  6. Ejemplo
      ...
      <Directory /var/www/>
                   Deny from 1.2.3.1
                   Deny from 1.2.3.2
                   Deny from 1.2.3.3
                   Options Indexes FollowSymLinks MultiViews
                   AllowOverride All
                   Order allow,deny
                   allow from all
                   # Added by FCG :
                   DirectoryIndex index.php index.html
      </Directory>
      ...