Skip to content

Instantly share code, notes, and snippets.

@pokisin
Created February 28, 2017 18:20
Show Gist options
  • Save pokisin/535d1c7b49865242f419e168aea7e353 to your computer and use it in GitHub Desktop.
Save pokisin/535d1c7b49865242f419e168aea7e353 to your computer and use it in GitHub Desktop.
Restringir accesos a carpetas server_ubuntu
# Primero habilitar
sudo a2enmod rewrite
# Configurar el siguiente archivo
sudo nano /etc/apache2/sites-available/000-default.conf
# Y agregar la siguiente linea al final del documento
<Directory "/var/www/html">
AllowOverride All
</Directory>
# Editamos el siguiente archivo
sudo nano /etc/apache2/apache2.conf
# Modificamos la siguiente linea
AllowOverride none
# Agregamos la siguiente
AllowOverride All
# Agregamos el archivo .htaccess con la siguiente instrucción en la ruta "/var/www/html"
Options All -Indexes
#Restauramos el apache
sudo service apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment