forked from hakwerk/labca
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx.conf
97 lines (77 loc) · 2.09 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
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
server {
listen [::]:80 default_server ipv6only=off;
server_name _;
server_tokens off;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
location /admin/ {
return 301 https://$host$request_uri;
}
location /acme/ {
return 301 https://$host$request_uri;
}
location /directory {
return 301 https://$host$request_uri;
}
location /ocsp/ {
include proxy_params;
proxy_pass http://127.0.0.1:4002/;
}
location /rate-limits {
try_files $uri $uri.html $uri/ =404;
}
location /terms/ {
try_files $uri $uri.html $uri/ =404;
}
}
server {
listen [::]:443 default_server ssl ipv6only=off;
server_name _;
server_tokens off;
ssl_certificate /etc/nginx/ssl/labca_cert.pem;
ssl_certificate_key /etc/nginx/ssl/labca_key.pem;
root /var/www/html;
index index.html index.htm index.nginx-debian.html;
location ~ ^/admin/static/(.+) {
alias /var/www/html/$1;
}
location ~ ^/admin/.+/static/(.+) {
alias /var/www/html/$1;
}
location /admin/ {
include proxy_params;
proxy_set_header X-Request-Base "/admin";
proxy_pass http://127.0.0.1:3000/;
error_page 502 504 /502.html;
}
location /admin/ws {
include proxy_params;
proxy_set_header X-Request-Base "/admin";
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_pass http://127.0.0.1:3000/ws;
}
location /acme/ {
include proxy_params;
proxy_pass http://127.0.0.1:4001;
}
location /directory {
include proxy_params;
proxy_pass http://127.0.0.1:4001;
}
location /ocsp/ {
include proxy_params;
proxy_pass http://127.0.0.1:4002/;
}
location /rate-limits {
try_files $uri $uri.html $uri/ =404;
}
location /terms/ {
try_files $uri $uri.html $uri/ =404;
}
# BEGIN temporary redirect
location = / {
return 302 /admin/;
}
# END temporary redirect
}