Last active
November 5, 2020 13:15
-
-
Save axxe16/37283a090bc3a9b6146d7d95a403fe3d to your computer and use it in GitHub Desktop.
Protezione con Password di cartella tramite htaccess #apache #password #folder
This file contains 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
1) creo file .htaccess dove | |
- AuthUserFile indica path del server in cui c'è la password | |
- AuthGroupFile indica il path del server relativo alla cartella da proteggere | |
AuthUserFile /home/www/fbsr/prod/test/.htpassword | |
AuthGroupFile /home/www/fbsr/prod/test/ | |
AuthName "Directory Protetta" | |
AuthType Basic | |
<Limit GET> | |
require valid-user | |
</Limit> | |
2) creo da terminale .htpassword con il seguente comando: | |
htpasswd -c /Users/alessandrograssi/Desktop/.htpassword username | |
- dove username è il nome utente da associare alla password che verrà richiesta due volte | |
3) copiare il file creato nel path indicato su htaccess |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment