30 lines
933 B
Nginx Configuration File
30 lines
933 B
Nginx Configuration File
server {
|
|
listen 80;
|
|
server_name _;
|
|
|
|
root /usr/share/nginx/html;
|
|
index index.html;
|
|
|
|
# --- Angular SPA sous /gameovergne ---
|
|
location /gameovergne/ {
|
|
try_files $uri $uri/ /gameovergne/index.html;
|
|
}
|
|
|
|
# --- Proxy PrestaShop ---
|
|
# Angular appelle /gameovergne/ps/xxx
|
|
# On doit forward vers https://shop.gameovergne.fr/api/xxx
|
|
location ^~ /gameovergne/ps/ {
|
|
# IMPORTANT : supprime le prefixe /gameovergne/ps/
|
|
rewrite ^/gameovergne/ps/(.*)$ /api/$1 break;
|
|
|
|
proxy_pass https://shop.gameovergne.fr;
|
|
|
|
proxy_set_header Host shop.gameovergne.fr;
|
|
proxy_set_header Authorization "Basic MkFRUEcxM01KOFgxMTdVNkZKNU5HSFBTOTNIRTM0QUI=";
|
|
proxy_ssl_server_name on;
|
|
|
|
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;
|
|
}
|
|
} |