Update nginx config

This commit is contained in:
ekzyis 2023-09-09 22:52:50 +02:00
parent 4fcd9770db
commit 0c7f7be359
1 changed files with 13 additions and 5 deletions

View File

@ -1,5 +1,9 @@
upstream delphi {
server 127.0.0.1:4321;
}
server {
server_name delphi.market;
server_name delphi.market;
listen 80;
listen [::]:80;
@ -15,10 +19,14 @@ server {
ssl_certificate /etc/letsencrypt/live/delphi.market/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/delphi.market/privkey.pem;
root /var/www/delphi;
index index.html;
try_files $uri $uri.html $uri/ =404;
error_page 404 /404.html;
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 /;
proxy_pass http://delphi$request_uri;
}
include letsencrypt.conf;
}