Zuletzt aktiv 1 month ago

nginx_htpassword_location.conf Originalformat
1location / {
2
3 satisfy any;
4 # Liste des IPs autorisées
5 allow 192.168.1.0/24;
6 # deny all; # Toutes les autres IPs sont refusées sans l’authentification
7
8 # Authentification basique
9 auth_basic "Restricted Content";
10 auth_basic_user_file /data/nginx/.htpasswd;
11
12 proxy_pass http://192.168.1.150:19999/;
13
14 proxy_set_header X-Forwarded-Host $host;
15 proxy_set_header X-Forwarded-Server $host;
16 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
17
18 proxy_pass_request_headers on;
19 proxy_set_header Connection "keep-alive";
20 proxy_store off;
21
22 gzip on;
23 gzip_proxied any;
24 gzip_types *;
25}