-
-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathnginx.conf
57 lines (47 loc) · 1.91 KB
/
nginx.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
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream studynotes.org-http-backends {
server 127.0.0.1:7030;
server 127.0.0.1:7031;
}
upstream studynotes.org-websocket-backends {
server 127.0.0.1:7040;
}
server {
listen 192.155.85.126:80;
server_name studynotes.org www.studynotes.org apstudynotes.com www.apstudynotes.com apstudynote.org www.apstudynote.org;
return 301 https://www.apstudynotes.org$request_uri;
}
server {
listen 192.155.85.126:80;
listen 192.155.85.126:443 http2 ssl;
server_name apstudynotes.org www.apstudynotes.org;
ssl_certificate /etc/letsencrypt/live/apstudynotes.org/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/apstudynotes.org/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/apstudynotes.org/chain.pem;
# Allow large note uploads
client_max_body_size 50M;
rewrite ^/colleges/essays/?$ /essays/ permanent;
rewrite ^/us-history/information/?$ /us-history/ permanent;
rewrite ^/us-history/information/the-exam/?$ /us-history/ permanent;
rewrite ^/us-history/information/topic-outline/?$ /us-history/ permanent;
rewrite ^/us-government/information/?$ /us-history/ permanent;
rewrite ^/us-government/information/the-exam-1/?$ /us-history/ permanent;
rewrite ^/us-government/information/topic-outline-1/?$ /us-history/ permanent;
rewrite ^/cornell/cornell-supplement/?$ /cornell/ permanent;
rewrite ^/common-app/youll-be-dead-in-a-month/?$ /common-app/ permanent;
rewrite ^/stanford/hitler-essay/?$ /stanford/ permanent;
rewrite ^/study-guides/?$ / permanent;
location / {
proxy_pass http://studynotes.org-http-backends;
include /home/feross/config/nginx/_proxy.include;
}
location = /websocket {
proxy_pass http://studynotes.org-websocket-backends;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
include /home/feross/config/nginx/_server.include;
}