generated from ForumViriumHelsinki/DjangoReactApp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx.conf.sample
48 lines (38 loc) · 1.26 KB
/
nginx.conf.sample
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
server {
listen 80;
server_name evaluator.fvh.io;
# Let's encrypt's temporary directory
location '/.well-known/acme-challenge' {
default_type "text/plain";
root /var/www/letsencrypt;
}
location / {
return 301 https://evaluator.fvh.io$request_uri;
}
}
server {
listen 443 ssl;
server_name evaluator.fvh.io;
client_max_body_size 4G;
access_log /site/evaluator.fvh.io/logs/nginx-access.log;
error_log /site/evaluator.fvh.io/logs/nginx-error.log;
ssl_certificate /etc/letsencrypt/live/evaluator.fvh.io/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/evaluator.fvh.io/privkey.pem;
include /etc/nginx/ssl-security.conf;
location /staticfiles/ {
alias /site/evaluator.fvh.io/CommuniCity/django_server/staticfiles/;
}
location /uploads/ {
alias /site/evaluator.fvh.io/CommuniCity/django_server/media/;
}
location ~* ^/(admin|rest) {
proxy_pass http://127.0.0.1:8001;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $host;
proxy_redirect off;
}
location / {
alias /site/evaluator.fvh.io/CommuniCity/react_ui/build/;
}
}