delphi.market/nginx.conf

46 lines
1.2 KiB
Nginx Configuration File
Raw Normal View History

2023-11-19 20:47:52 +00:00
upstream delphi-prod-backend {
2023-09-09 20:52:50 +00:00
server 127.0.0.1:4321;
}
2023-11-19 20:47:52 +00:00
upstream delphi-prod-frontend {
server 127.0.0.1:4173;
}
2023-09-09 20:52:50 +00:00
server {
2023-09-09 20:52:50 +00:00
server_name delphi.market;
2023-09-09 20:52:50 +00:00
listen 80;
listen [::]:80;
return 301 https://delphi.market$request_uri;
}
server {
server_name delphi.market;
listen 443;
listen [::]:443;
ssl on;
ssl_certificate /etc/letsencrypt/live/delphi.market/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/delphi.market/privkey.pem;
2023-09-09 20:52:50 +00:00
location / {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Prefix /;
2023-11-19 20:47:52 +00:00
proxy_pass http://delphi-prod-frontend$request_uri;
}
location /api {
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Prefix /;
proxy_pass http://delphi-prod-backend$request_uri;
2023-09-09 20:52:50 +00:00
}
2023-09-09 20:52:50 +00:00
include letsencrypt.conf;
}