Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wp-statistics domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/wordpress/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wp-pagenavi domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/wordpress/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/wordpress/wp-includes/functions.php on line 6114
Sécuriser un Alias Apache par un mot de passe - Plessy

Sécuriser un Alias Apache par un mot de passe

Prérequis: Un serveur Debian avec un environnement LAMP déployé

Le but de ce pense-bête est de sécuriser un de vos sous domaine en demandant un mot de passe à l’ouverture de la page.

ATTENTION: Prenez bien soin et remplacer chaque $VARIABLE par vos propres paramètres.

Commencez par créer le ficher qui contiendra le mot de passe de votre utilisateur ($USERNAME):

sudo htpasswd -c /etc/apache2/passwords $USERNAME

Éditez votre configuration Apache pour ajouter dans l’Alias concerné:

AuthType Basic
AuthName "Restricted Files"
# (Following line optional)
AuthBasicProvider file
AuthUserFile "/etc/apache2/passwords"
Require user $USERNAME

Redemarrez Apache:

sudo service apache2 restart