-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathkey.value.store.conf
More file actions
99 lines (63 loc) · 2.23 KB
/
key.value.store.conf
File metadata and controls
99 lines (63 loc) · 2.23 KB
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
## STEP 1 START
#Following Block of text is for IP Allow/Deny List
keyval_zone zone=allowlist_zone:1m type=ip state=allowlist_zone.keyval;
keyval $remote_addr $target zone=allowlist_zone;
server {
listen 8443;
index index.html;
if ($target) {
return 403;
}
location / {
root /opt/services/covid-app;
}
}
## STEP 1 END
## STEP 2 START
#Following Block of text is for IP Allow/Deny List
keyval_zone zone=allowlist_zone:1m type=ip state=allowlist_zone.keyval;
keyval $remote_addr $target zone=allowlist_zone;
#keyval_zone zone=ssl_crt:10m; # Key-value store for certificate data
#keyval_zone zone=ssl_key:10m; # Key-value store for private key data
#keyval $ssl_server_name $crt_pem zone=ssl_crt; # Use SNI as key to obtain cert
#keyval $ssl_server_name $key_pem zone=ssl_key;
server {
listen 8443 ssl;
server_name _;
index index.html;
ssl_certificate ssl/www.example.com.crt;
ssl_certificate_key ssl/www.example.com.key;
ssl_protocols TLSv1.3 TLSv1.2 TLSv1.1;
ssl_prefer_server_ciphers on;
if ($target) {
return 403;
}
location / {
root /opt/services/covid-app;
}
}
### STEP 2 END
## kev.value.store.conf STEP 3 START
#Following Block of text is for IP Allow/Deny List
keyval_zone zone=allowlist_zone:1m type=ip state=allowlist_zone.keyval;
keyval $remote_addr $target zone=allowlist_zone;
keyval_zone zone=ssl_crt:10m; # Key-value store for certificate data
keyval_zone zone=ssl_key:10m; # Key-value store for private key data
keyval $ssl_server_name $crt_pem zone=ssl_crt; # Use SNI as key to obtain cert
keyval $ssl_server_name $key_pem zone=ssl_key;
server {
listen 8443 ssl;
server_name _;
index index.html;
ssl_certificate data:$crt_pem; # Certificate from key-value store
ssl_certificate_key data:$key_pem; # Private key from key-value store
ssl_protocols TLSv1.3 TLSv1.2 TLSv1.1;
ssl_prefer_server_ciphers on;
if ($target) {
return 403;
}
location / {
root /opt/services/covid-app;
}
}
## kev.value.store.conf STEP 3 END