This repository has been archived by the owner on Jun 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
unrealestate.sg.nginx
66 lines (51 loc) · 1.52 KB
/
unrealestate.sg.nginx
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
upstream unrealestate_app_server {
server unix:///home/unrealestate/unrealestate-web/unrealestate.sock;
}
server {
# Force HTTPS
server_name www.unrealestate.sg unrealestate.sg;
return 301 https://$host$request_uri;
}
server {
listen 443;
ssl on;
ssl_certificate /etc/letsencrypt/live/unrealestate.sg/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/unrealestate.sg/privkey.pem;
server_name www.unrealestate.sg;
return 301 https://unrealestate.sg$request_uri;
}
server {
listen 443 default_server;
ssl on;
ssl_certificate /etc/letsencrypt/live/unrealestate.sg/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/unrealestate.sg/privkey.pem;
server_name unrealestate.sg;
keepalive_timeout 10;
client_max_body_size 20M;
if ($host !~* ^(unrealestate.sg)$ ) {
return 444;
}
location /media/uploads/videos {
alias /home/unrealestate/unrealestate-web/media/uploads/videos;
mp4;
mp4_buffer_size 4M;
mp4_max_buffer_size 10M;
limit_rate 260k;
limit_rate_after 3m;
}
location /media {
alias /home/unrealestate/unrealestate-web/media;
expires 7d;
}
location ~ ^/favicon.(\w*)$ {
alias /home/unrealestate/unrealestate-web/static-cache/favicon.$1;
}
location /static {
alias /home/unrealestate/unrealestate-web/static-cache;
expires 7d;
}
location / {
include uwsgi_params;
uwsgi_pass unrealestate_app_server;
}
}