-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathnginx.conf
63 lines (50 loc) · 1.48 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
58
59
60
61
62
63
upstream jupiter {
server web:3000;
}
server {
listen 80;
server_name $HOSTNAME;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
client_max_body_size 4G;
keepalive_timeout 10;
ssl_certificate /etc/nginx/certs/library.ualberta.ca.bundle.crt;
ssl_certificate_key /etc/nginx/certs/library.ualberta.ca.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
error_page 500 502 504 /500.html;
error_page 497 301 =307 https://$host:$server_port$request_uri;
server_name $HOSTNAME jupiter;
root /app/public;
try_files $uri/index.html $uri @jupiter;
location @jupiter {
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-Ssl on;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Origin https://$http_host;
proxy_redirect off;
proxy_pass http://jupiter;
# limit_req zone=one;
access_log /var/log/nginx.access.log;
error_log /var/log/nginx.error.log;
}
location ^~ /packs/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
location ~ /active_storage/blobs {
deny all;
return 410;
}
if ($request_method !~ ^(GET|HEAD|PUT|PATCH|POST|DELETE|OPTIONS)$ ) {
return 405;
}
}