Raspi - Wiki

Installation de RaspiOS

Outils pour utilisateurs

Outils du site


web:authentification

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
web:authentification [2022/02/24 18:08] michelweb:authentification [2022/03/09 14:23] (Version actuelle) michel
Ligne 6: Ligne 6:
 sudo htpasswd -c /etc/nginx/.htpasswd pi sudo htpasswd -c /etc/nginx/.htpasswd pi
 </code> </code>
-Puis on configure nginx en editant le fichier +Puis on configure nginx en editant le fichier //**/etc/nginx/sites-available/monsite**// 
 +<file conf monsite> 
 +server { 
 + listen 80; 
 + listen [::]:80; 
 + root /var/www/monsite; 
 + index index.php index.html index.htm 
 + server_name monsite.com; 
 + location / { 
 +                try_files $uri $uri/ =404; 
 + auth_basic "Secure area - Authentication requise"; 
 +                auth_basic_user_file /etc/nginx/.htpasswd; 
 +
 + location ~ \.php$ { 
 + include snippets/fastcgi-php.conf; 
 + fastcgi_pass unix:/run/php/php7.4-fpm.sock; 
 +
 +
 +</file> 
 +Et comme pour virtualhost il faut recharger la configuration de NGINX 
 + 
 + 
 + 
 +{{counter}}
web/authentification.1645722532.txt.gz · Dernière modification : 2022/02/24 18:08 de michel