Ceci fonctionne avec Joomla ou sans Joomla :
Créer dans le dossier a protéger (teleformations dans le cas présent) un fichier .htaccess qui contient le chemin vers le un autre fichier .htpasswd
Contenu du fichier .htaccess
# Protection du repertoire : /lamp0/web/vhosts/www.asfis.org/htdocs/teleformations/ ###START
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /srv/data/web/vhosts/www.asfis.org/.htpasswd
AuthGroupFile /dev/null
require valid-user
### Protection du repertoire : /lamp0/web/vhosts/www.asfis.org/htdocs/teleformations/ ###END
Créer à la racine du hosting (juste avant le repertoire root de joomla)
ex serveur simple hosting ASFIS : /lamp0/web/vhosts/www.asfis.org/
Contenu du fichier .htpasswd
asfis:Pux5zM82RbE6.
asfis = user
Pux5zM82RbE6. = le mot de passe crypté avec l'outil ci après :
http://www.tools.dynamicdrive.com/password/
On peut ajouter un user par ligne.
Autre sources et liens :
https://docs.gandi.net/fr/simple_hosting/tutoriels/htaccess.html