1
- From ebe3b5a97cc52f1d75945b058df1e93ec92688ee Mon Sep 17 00:00:00 2001
1
+ From 51dca2dc89662447fd826ec62453ab56a05a0f97 Mon Sep 17 00:00:00 2001
2
2
From: Franck Nijhof <
[email protected] >
3
3
Date: Fri, 12 Jan 2024 17:00:45 +0100
4
- Subject: [PATCH] Patch /data to /config folder
4
+ Subject: [PATCH 1/3 ] Patch /data to /config folder
5
5
6
6
---
7
7
backend/internal/access-list.js | 2 +-
@@ -19,15 +19,16 @@ Subject: [PATCH] Patch /data to /config folder
19
19
backend/templates/stream.conf | 8 ++---
20
20
docker/rootfs/etc/nginx/conf.d/default.conf | 6 ++--
21
21
.../include/letsencrypt-acme-challenge.conf | 2 +-
22
+ .../rootfs/etc/nginx/conf.d/include/log.conf | 2 +-
22
23
docker/rootfs/etc/nginx/nginx.conf | 31 ++++++++++---------
23
- global/certbot-dns-plugins.js | 2 +-
24
- 17 files changed, 51 insertions(+), 50 deletions(-)
24
+ global/certbot-dns-plugins.json | 2 +-
25
+ 18 files changed, 52 insertions(+), 51 deletions(-)
25
26
26
27
diff --git a/backend/internal/access-list.js b/backend/internal/access-list.js
27
- index 8457792..48415d2 100644
28
+ index 72326be..a7a122f 100644
28
29
--- a/backend/internal/access-list.js
29
30
+++ b/backend/internal/access-list.js
30
- @@ -462 ,7 +462 ,7 @@ const internalAccessList = {
31
+ @@ -461 ,7 +461 ,7 @@ const internalAccessList = {
31
32
* @returns {String}
32
33
*/
33
34
getFilename: (list) => {
@@ -37,10 +38,10 @@ index 8457792..48415d2 100644
37
38
38
39
/**
39
40
diff --git a/backend/internal/certificate.js b/backend/internal/certificate.js
40
- index 871a280..463bcfd 100644
41
+ index 34b8fdf..fb43205 100644
41
42
--- a/backend/internal/certificate.js
42
43
+++ b/backend/internal/certificate.js
43
- @@ -520 ,7 +520 ,7 @@ const internalCertificate = {
44
+ @@ -515 ,7 +515 ,7 @@ const internalCertificate = {
44
45
writeCustomCert: (certificate) => {
45
46
logger.info('Writing Custom Certificate:', certificate);
46
47
@@ -49,7 +50,7 @@ index 871a280..463bcfd 100644
49
50
50
51
return new Promise((resolve, reject) => {
51
52
if (certificate.provider === 'letsencrypt') {
52
- @@ -1151 ,7 +1151 ,7 @@ const internalCertificate = {
53
+ @@ -1143 ,7 +1143 ,7 @@ const internalCertificate = {
53
54
}
54
55
55
56
// Create a test challenge file
@@ -59,7 +60,7 @@ index 871a280..463bcfd 100644
59
60
fs.mkdirSync(testChallengeDir, {recursive: true});
60
61
fs.writeFileSync(testChallengeFile, 'Success', {encoding: 'utf8'});
61
62
diff --git a/backend/internal/nginx.js b/backend/internal/nginx.js
62
- index 77933e7..47c3b60 100644
63
+ index 5f802c0..a86186d 100644
63
64
--- a/backend/internal/nginx.js
64
65
+++ b/backend/internal/nginx.js
65
66
@@ -126,9 +126,9 @@ const internalNginx = {
@@ -74,7 +75,7 @@ index 77933e7..47c3b60 100644
74
75
},
75
76
76
77
/**
77
- @@ -276 ,7 +276 ,7 @@ const internalNginx = {
78
+ @@ -278 ,7 +278 ,7 @@ const internalNginx = {
78
79
79
80
return new Promise((resolve, reject) => {
80
81
let template = null;
@@ -83,7 +84,7 @@ index 77933e7..47c3b60 100644
83
84
84
85
try {
85
86
template = fs.readFileSync(__dirname + '/../templates/letsencrypt-request.conf', {encoding: 'utf8'});
86
- @@ -338 ,7 +338 ,7 @@ const internalNginx = {
87
+ @@ -340 ,7 +340 ,7 @@ const internalNginx = {
87
88
* @returns {Promise}
88
89
*/
89
90
deleteLetsEncryptRequestConfig: (certificate) => {
@@ -106,7 +107,7 @@ index d4ac67d..a7c2a31 100644
106
107
107
108
// Configure nginx
108
109
diff --git a/backend/lib/config.js b/backend/lib/config.js
109
- index caa57fc..a04b80b 100644
110
+ index f7fbdca..05fc95b 100644
110
111
--- a/backend/lib/config.js
111
112
+++ b/backend/lib/config.js
112
113
@@ -2,7 +2,7 @@ const fs = require('fs');
@@ -156,10 +157,10 @@ index 06ca7bb..654e5e4 100644
156
157
{% endif %}
157
158
158
159
diff --git a/backend/templates/dead_host.conf b/backend/templates/dead_host.conf
159
- index d94dff5..3c18acd 100644
160
+ index 7a06469..4605a93 100644
160
161
--- a/backend/templates/dead_host.conf
161
162
+++ b/backend/templates/dead_host.conf
162
- @@ -7 ,8 +7 ,8 @@ server {
163
+ @@ -10 ,8 +10 ,8 @@ server {
163
164
{% include "_hsts.conf" %}
164
165
{% include "_forced_ssl.conf" %}
165
166
@@ -210,10 +211,10 @@ index 676c8a6..6bb985b 100644
210
211
include conf.d/include/letsencrypt-acme-challenge.conf;
211
212
212
213
diff --git a/backend/templates/proxy_host.conf b/backend/templates/proxy_host.conf
213
- index 81a542e..6e6ad83 100644
214
+ index d23ca46..0de6647 100644
214
215
--- a/backend/templates/proxy_host.conf
215
216
+++ b/backend/templates/proxy_host.conf
216
- @@ -19 ,8 +19 ,8 @@ proxy_set_header Connection $http_connection;
217
+ @@ -22 ,8 +22 ,8 @@ proxy_set_header Connection $http_connection;
217
218
proxy_http_version 1.1;
218
219
{% endif %}
219
220
@@ -224,7 +225,7 @@ index 81a542e..6e6ad83 100644
224
225
225
226
{{ advanced_config }}
226
227
227
- @@ -45 ,6 +45 ,6 @@ proxy_http_version 1.1;
228
+ @@ -48 ,6 +48 ,6 @@ proxy_http_version 1.1;
228
229
{% endif %}
229
230
230
231
# Custom
@@ -233,10 +234,10 @@ index 81a542e..6e6ad83 100644
233
234
}
234
235
{% endif %}
235
236
diff --git a/backend/templates/redirection_host.conf b/backend/templates/redirection_host.conf
236
- index 339fe72..957ecc7 100644
237
+ index 7dd3607..61ee0c2 100644
237
238
--- a/backend/templates/redirection_host.conf
238
239
+++ b/backend/templates/redirection_host.conf
239
- @@ -9 ,8 +9 ,8 @@ server {
240
+ @@ -12 ,8 +12 ,8 @@ server {
240
241
{% include "_hsts.conf" %}
241
242
{% include "_forced_ssl.conf" %}
242
243
@@ -247,7 +248,7 @@ index 339fe72..957ecc7 100644
247
248
248
249
{{ advanced_config }}
249
250
250
- @@ -27 ,6 +27 ,6 @@ server {
251
+ @@ -30 ,6 +30 ,6 @@ server {
251
252
{% endif %}
252
253
253
254
# Custom
@@ -319,8 +320,18 @@ index ff2a782..0225bc5 100644
319
320
}
320
321
321
322
# Hide /acme-challenge subdirectory and return 404 on all requests.
323
+ diff --git a/docker/rootfs/etc/nginx/conf.d/include/log.conf b/docker/rootfs/etc/nginx/conf.d/include/log.conf
324
+ index 0d74029..29f1a7a 100644
325
+ --- a/docker/rootfs/etc/nginx/conf.d/include/log.conf
326
+ +++ b/docker/rootfs/etc/nginx/conf.d/include/log.conf
327
+ @@ -1,4 +1,4 @@
328
+ log_format proxy '[$time_local] $upstream_cache_status $upstream_status $status - $request_method $scheme $host "$request_uri" [Client $remote_addr] [Length $body_bytes_sent] [Gzip $gzip_ratio] [Sent-to $server] "$http_user_agent" "$http_referer"';
329
+ log_format standard '[$time_local] $status - $request_method $scheme $host "$request_uri" [Client $remote_addr] [Length $body_bytes_sent] [Gzip $gzip_ratio] "$http_user_agent" "$http_referer"';
330
+
331
+ - access_log /data/logs/fallback_access.log proxy;
332
+ + access_log /config/logs/fallback_access.log proxy;
322
333
diff --git a/docker/rootfs/etc/nginx/nginx.conf b/docker/rootfs/etc/nginx/nginx.conf
323
- index 8261833..8d3ca91 100644
334
+ index 3a31e14..ae96614 100644
324
335
--- a/docker/rootfs/etc/nginx/nginx.conf
325
336
+++ b/docker/rootfs/etc/nginx/nginx.conf
326
337
@@ -1,5 +1,6 @@
@@ -330,7 +341,7 @@ index 8261833..8d3ca91 100644
330
341
pid /run/nginx/nginx.pid;
331
342
user npm;
332
343
333
- @@ -9,13 +10,13 @@ worker_processes auto;
344
+ @@ -9,16 +10,16 @@ worker_processes auto;
334
345
# Enables the use of JIT for regular expressions to speed-up their processing.
335
346
pcre_jit on;
336
347
@@ -340,13 +351,17 @@ index 8261833..8d3ca91 100644
340
351
# Includes files with directives to load dynamic modules.
341
352
include /etc/nginx/modules/*.conf;
342
353
354
+ # Custom
355
+ - include /data/nginx/custom/root_top[.]conf;
356
+ + include /config/nginx/custom/root_top[.]conf;
357
+
343
358
events {
344
359
- include /data/nginx/custom/events[.]conf;
345
360
+ include /config/nginx/custom/events[.]conf;
346
361
}
347
362
348
363
http {
349
- @@ -40,13 +41,13 @@ http {
364
+ @@ -43,8 +44,8 @@ http {
350
365
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
351
366
proxy_set_header Accept-Encoding "";
352
367
proxy_cache off;
@@ -355,15 +370,9 @@ index 8261833..8d3ca91 100644
355
370
+ proxy_cache_path /tmp/nginx/cache/public levels=1:2 keys_zone=public-cache:30m max_size=192m;
356
371
+ proxy_cache_path /tmp/nginx/cache/private levels=1:2 keys_zone=private-cache:5m max_size=1024m;
357
372
358
- log_format proxy '[$time_local] $upstream_cache_status $upstream_status $status - $request_method $scheme $host "$request_uri" [Client $remote_addr] [Length $body_bytes_sent] [Gzip $gzip_ratio] [Sent-to $server] "$http_user_agent" "$http_referer"';
359
- log_format standard '[$time_local] $status - $request_method $scheme $host "$request_uri" [Client $remote_addr] [Length $body_bytes_sent] [Gzip $gzip_ratio] "$http_user_agent" "$http_referer"';
360
-
361
- - access_log /data/logs/fallback_access.log proxy;
362
- + access_log /config/logs/fallback_access.log proxy;
363
-
364
- # Dynamically generated resolvers file
365
- include /etc/nginx/conf.d/include/resolvers.conf;
366
- @@ -69,27 +70,27 @@ http {
373
+ # Log format and fallback log file
374
+ include /etc/nginx/conf.d/include/log.conf;
375
+ @@ -70,27 +71,27 @@ http {
367
376
real_ip_recursive on;
368
377
369
378
# Custom
@@ -401,19 +410,19 @@ index 8261833..8d3ca91 100644
401
410
# Custom
402
411
- include /data/nginx/custom/root[.]conf;
403
412
+ include /config/nginx/custom/root[.]conf;
404
- diff --git a/global/certbot-dns-plugins.js b/global/certbot-dns-plugins.js
405
- index 78c67ed..f695cca 100644
406
- --- a/global/certbot-dns-plugins.js
407
- +++ b/global/certbot-dns-plugins.js
408
- @@ -27 ,7 +27 ,7 @@ module.exports = {
409
- version_requirement: '~=0.1.0' ,
410
- dependencies: '' ,
411
- credentials: `dns_acmedns_api_url = http://acmedns-server/
412
- - dns_acmedns_registration_file = / data/acme-registration.json` ,
413
- + dns_acmedns_registration_file = / config/acme-registration.json` ,
414
- full_plugin_name: ' dns-acmedns',
413
+ diff --git a/global/certbot-dns-plugins.json b/global/certbot-dns-plugins.json
414
+ index 6729842..82cbd78 100644
415
+ --- a/global/certbot-dns-plugins.json
416
+ +++ b/global/certbot-dns-plugins.json
417
+ @@ -4 ,7 +4 ,7 @@
418
+ "package_name": "certbot-dns-acmedns" ,
419
+ "version": "~=0.1.0" ,
420
+ "dependencies": "",
421
+ - "credentials": "dns_acmedns_api_url = http://acmedns-server/\ndns_acmedns_registration_file = / data/acme-registration.json" ,
422
+ + "credentials": "dns_acmedns_api_url = http://acmedns-server/\ndns_acmedns_registration_file = / config/acme-registration.json" ,
423
+ " full_plugin_name": " dns-acmedns"
415
424
},
416
- aliyun: {
425
+ "active24": {
417
426
- -
418
- 2.39.2
427
+ 2.42.0
419
428
0 commit comments