-
Notifications
You must be signed in to change notification settings - Fork 16
/
nginx.conf
53 lines (43 loc) · 1.61 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
events {
}
http {
client_max_body_size 20m;
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
return 301 https://$host$request_uri;
}
server {
gzip_vary on;
gzip on;
gzip_static on; # allows pre-serving of .gz files if it exists
gzip_disable "msie6"; # Disable for user-agent Internet explorer 6. Not supported.
gzip_proxied any; # enable gzip for all proxied requests
gzip_buffers 16 8k; # number and size of buffers to compress a response
gzip_http_version 1.1;
gzip_min_length 0; # Only gzip files of size in bytes
gzip_types text/plain text/css text/html application/javascript application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript application/vnd.ms-fontobject application/x-font-ttf font/opentype image/svg+xml image/x-icon;
gunzip on; # Uncompress on the fly
listen 443 ssl;
server_name lifebank.io;
location / {
proxy_pass http://webapp:3000/;
}
ssl_certificate /opt/application/nginx/certificates/lifebank.io.crt;
ssl_certificate_key /opt/application/nginx/certificates/lifebank.io.key;
}
server {
listen 443 ssl;
server_name graphql.lifebank.io;
location / {
proxy_set_header Host $host;
proxy_set_header Accept-Encoding "";
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://hasura:8080/;
}
ssl_certificate /opt/application/nginx/certificates/graphql.lifebank.io.crt;
ssl_certificate_key /opt/application/nginx/certificates/graphql.lifebank.io.key;
}
}