Skip to content

Instantly share code, notes, and snippets.

@axxe16
Last active November 5, 2020 13:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save axxe16/37283a090bc3a9b6146d7d95a403fe3d to your computer and use it in GitHub Desktop.
Save axxe16/37283a090bc3a9b6146d7d95a403fe3d to your computer and use it in GitHub Desktop.
Protezione con Password di cartella tramite htaccess #apache #password #folder
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