-
Notifications
You must be signed in to change notification settings - Fork 0
/
ralph.conf
73 lines (58 loc) · 1.73 KB
/
ralph.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
server {
listen 80;
server_name assets.domain.com;
client_max_body_size 512M;
proxy_set_header Connection "";
proxy_http_version 1.1;
proxy_connect_timeout 300;
proxy_read_timeout 300;
access_log /var/log/nginx/ralph-access.log;
error_log /var/log/nginx/ralph-error.log;
location /static {
alias /usr/share/ralph/static;
access_log off;
log_not_found off;
expires 1M;
}
#location /media {
# alias /var/local/ralph/media;
# add_header Content-disposition "attachment";
#}
location / {
proxy_pass http://127.0.0.1:8000;
include /etc/nginx/uwsgi_params;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
server {
listen 443;
ssl on;
ssl_certificate /etc/ssl/letsencrypt/domain.com/live/fullchain.pem;
ssl_certificate_key /etc/ssl/letsencrypt/domain.com/live/privkey.pem;
server_name assets.domain.com;
client_max_body_size 512M;
server_name assets.domain.com;
proxy_set_header Connection "";
proxy_http_version 1.1;
proxy_connect_timeout 300;
proxy_read_timeout 300;
access_log /var/log/nginx/nginx.vhost.access.log;
error_log /var/log/nginx/nginx.vhost.error.log;
# location / {
# root /var/www/;
# index index.html;
# }
location /static {
alias /usr/share/ralph/static;
access_log off;
log_not_found off;
expires 1M;
}
location / {
proxy_pass http://127.0.0.1:8000;
include /etc/nginx/uwsgi_params;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}