52 lines
1.5 KiB
Plaintext
52 lines
1.5 KiB
Plaintext
# HTTP : ACME + redirection HTTPS (Salon + Tloto)
|
|
server {
|
|
listen 80;
|
|
server_name ${SALON_DOMAIN1} ${SALON_DOMAIN2} ${PREDIQO_DOMAIN} ${PREDIQO_DOMAIN_WWW};
|
|
|
|
location /.well-known/acme-challenge/ {
|
|
root /var/www/certbot;
|
|
}
|
|
|
|
location / {
|
|
return 301 https://$host$request_uri;
|
|
}
|
|
}
|
|
|
|
# Salon — HTTPS
|
|
# Docker DNS + upstreams variables (évite 502 après recreate des conteneurs Salon).
|
|
server {
|
|
listen 443 ssl;
|
|
http2 on;
|
|
server_name ${SALON_DOMAIN1} ${SALON_DOMAIN2};
|
|
|
|
ssl_certificate /etc/letsencrypt/live/${CERT_PRIMARY_DOMAIN}/fullchain.pem;
|
|
ssl_certificate_key /etc/letsencrypt/live/${CERT_PRIMARY_DOMAIN}/privkey.pem;
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
|
|
|
client_max_body_size 20m;
|
|
|
|
resolver 127.0.0.11 valid=10s ipv6=off;
|
|
resolver_timeout 5s;
|
|
|
|
location /api/ {
|
|
set $salon_api business_mgt_backend:5001;
|
|
proxy_pass http://$salon_api$request_uri;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
|
|
location / {
|
|
set $salon_web business_mgt_frontend_with_vite:5002;
|
|
proxy_pass http://$salon_web$request_uri;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
}
|
|
}
|