forked from Brain-up/brn
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default_with_tls.conf
113 lines (106 loc) · 2.94 KB
/
default_with_tls.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
server {
listen 80;
server_name localhost brainup.site www.brainup.site;
index index.html;
location ~ /.well-known/acme-challenge { #certbot checks
allow all;
root /usr/share/nginx/html/certcheck;
}
return 301 https://brainup.site$request_uri;
}
server {
listen 80;
server_name brainup.fun;
index index.html;
location ~ /.well-known/acme-challenge {
allow all;
root /usr/share/nginx/html/certcheck;
}
return 301 https://brainup.site$request_uri;
}
server {
listen 443 ssl;
server_name localhost brainup.site www.brainup.site;
ssl_certificate /etc/letsencrypt/live/brainup.site/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/brainup.site/privkey.pem;
# Enable gzip compression
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types
text/plain
text/css
application/json
application/javascript
application/x-javascript
text/xml
application/xml
application/xml+rss
text/javascript;
location / {
root /usr/share/nginx/html;
try_files $uri$args $uri$args/ /index.html;
}
location /admin {
root /usr/share/nginx/html;
try_files $uri $uri/ /admin/index.html?/$request_uri;
}
location /api {
proxy_pass http://brn:8081/api;
}
location /.well-known/acme-challenge { #certbot checks
allow all;
root /usr/share/nginx/html/certcheck;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
server {
listen 443 default_server ssl;
server_name brainup.fun;
ssl_certificate /etc/letsencrypt/live/brainup.fun/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/brainup.fun/privkey.pem;
# Enable gzip compression
gzip on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types
text/plain
text/css
application/json
application/javascript
application/x-javascript
text/xml
application/xml
application/xml+rss
text/javascript;
location / {
root /usr/share/nginx/html;
try_files $uri$args $uri$args/ /index.html;
}
location /admin {
root /usr/share/nginx/html;
try_files $uri $uri/ /admin/index.html?/$request_uri;
}
location /api {
proxy_pass http://brn:8081/api;
}
location /.well-known/acme-challenge { #certbot checks
allow all;
root /usr/share/nginx/html/certcheck;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}