-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathnginx.prod.conf
39 lines (32 loc) · 894 Bytes
/
nginx.prod.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
upstream classroomconversation {
server backend:8000;
}
server {
listen 80;
server_name iluweb01.it.ntnu.no;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name iluweb01.it.ntnu.no;
ssl_certificate iluweb01.it.ntnu.no.crt;
ssl_certificate_key iluweb01.it.ntnu.no.key;
location ~^/(api|i18n|admin|upload|account) {
proxy_pass http://classroomconversation;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Host $http_host;
proxy_redirect off;
}
location / {
add_header Cache-Control "private, no-store, no-cache";
root /home/app/web/frontend;
try_files $uri $uri/ /index.html;
}
location /staticfiles/ {
alias /home/app/web/staticfiles/;
}
location /mediafiles/ {
alias /home/app/web/mediafiles/;
}
}