-
-
Save pokisin/535d1c7b49865242f419e168aea7e353 to your computer and use it in GitHub Desktop.
Restringir accesos a carpetas server_ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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