-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
marcpartensky.conf
47 lines (37 loc) · 1.2 KB
/
marcpartensky.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
upstream simple_academy_server {
server unix:/opt/website/run/gunicorn.sock fail_timeout=0;
}
# server {
# server_name marcpartensky.com;
# listen 80;
# return 301 https://marcpartensky.com$request_uri;
# }
server {
server_name marcpartensky.com 82.165.57.233;
listen 443 ssl;
charset utf-8;
ssl_certificate /etc/letsencrypt/live/marcpartensky.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/marcpartensky.com/privkey.pem;
#Max upload size
client_max_body_size 400M; # adjust to taste
# Django media
location /media {
alias /root/git/website/media; # your Django project's media files
}
location /assets {
alias /root/git/website/static; # your Django project's static files
}
# Finally, send all non-media requests to the Django server.
location / {
proxy_pass http://127.0.0.1:8000;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_redirect off;
if (!-f $request_filename) {
proxy_pass http://marcpartensky.com;
break;
}
}
# root [path]/bar;
}