You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
940 B
33 lines
940 B
server { |
|
server_name new.rixdagen.se; |
|
listen 80; |
|
listen [::]:80; |
|
location / { |
|
return 301 https://$host$request_uri; |
|
} |
|
} |
|
|
|
server { |
|
server_name new.rixdagen.se; |
|
listen 443 ssl; |
|
listen [::]:443 ssl; |
|
ssl_certificate /etc/letsencrypt/live/new.rixdagen.se/fullchain.pem; |
|
ssl_certificate_key /etc/letsencrypt/live/new.rixdagen.se/privkey.pem; |
|
include /etc/letsencrypt/options-ssl-nginx.conf; |
|
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; |
|
|
|
location /api { |
|
proxy_pass http://127.0.0.1:8000; |
|
proxy_http_version 1.1; |
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
proxy_set_header Host $host; |
|
proxy_set_header X-Real-IP $remote_addr; |
|
proxy_set_header X-Forwarded-Proto $scheme; |
|
} |
|
|
|
location / { |
|
root /home/lasse/riksdagen/frontend/dist; |
|
try_files $uri $uri/ /index.html; |
|
index index.html; |
|
} |
|
}
|
|
|