-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
51 lines (44 loc) · 1.15 KB
/
nginx.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
upstream django_server {
server localhost:8000;
}
upstream svelte_server {
server localhost:5173;
}
server {
listen 443 ssl;
ssl_certificate /etc/ssl/certs/cert.pem;
ssl_certificate_key /etc/ssl/private/key.pem;
server_name tower.test;
location /api {
# pass api requests to django
proxy_pass https://django_server;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_ssl_verify off;
proxy_redirect off;
}
location /static {
# django static files
proxy_pass https://django_server;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_ssl_verify off;
proxy_redirect off;
}
location / {
# pass all other requests to svelte
proxy_pass https://svelte_server;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_ssl_verify off;
proxy_redirect off;
}
# location /staticfiles/ {
# autoindex on;
# alias /staticfiles/;
# }
# location /media/ {
# autoindex on;
# alias /media/;
# }
}