Update client/nginx.conf
This commit is contained in:
@@ -2,26 +2,31 @@ server {
|
|||||||
listen 80;
|
listen 80;
|
||||||
server_name _;
|
server_name _;
|
||||||
|
|
||||||
# Force DNS en IPv4 (sinon Nginx tente IPv6 et échoue)
|
# Le build Angular est dans /usr/share/nginx/html/browser
|
||||||
resolver 1.1.1.1 ipv6=off;
|
|
||||||
|
|
||||||
# Build Angular
|
|
||||||
root /usr/share/nginx/html/browser;
|
root /usr/share/nginx/html/browser;
|
||||||
index index.html;
|
index index.html;
|
||||||
|
|
||||||
# Angular SPA
|
# === Angular SPA ===
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /index.html;
|
try_files $uri $uri/ /index.html;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Proxy Presta (Traefik transforme /gameovergne/ps -> /ps)
|
# === Proxy PrestaShop ===
|
||||||
|
# Côté Angular tu appelles : /gameovergne/ps/...
|
||||||
|
# Traefik strip /gameovergne -> Nginx voit /ps/...
|
||||||
location /ps/ {
|
location /ps/ {
|
||||||
proxy_pass https://shop.gameovergne.fr/api/;
|
# ⚠ ICI : on force l'IPv4 de shop.gameovergne.fr
|
||||||
|
proxy_pass https://83.166.157.136/api/;
|
||||||
|
|
||||||
|
# On garde le Host/SNI sur shop.gameovergne.fr pour TLS + Presta
|
||||||
proxy_set_header Host shop.gameovergne.fr;
|
proxy_set_header Host shop.gameovergne.fr;
|
||||||
proxy_set_header Authorization "Basic MkFRUEcxM01KOFgxMTdVNkZKNU5HSFBTOTNIRTM0QUI=";
|
|
||||||
|
|
||||||
|
# SNI explicite, puisque proxy_pass utilise une IP maintenant
|
||||||
proxy_ssl_server_name on;
|
proxy_ssl_server_name on;
|
||||||
|
proxy_ssl_name shop.gameovergne.fr;
|
||||||
|
|
||||||
|
# Auth basic comme dans ton ancien proxy.conf.json
|
||||||
|
proxy_set_header Authorization "Basic MkFRUEcxM01KOFgxMTdVNkZKNU5HSFBTOTNIRTM0QUI=";
|
||||||
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|||||||
Reference in New Issue
Block a user