Skip to content

Commit 0948873

Browse files
committed
Update Nginx Proxy Manager to v2.12.1
1 parent a398e20 commit 0948873

6 files changed

+110
-142
lines changed

proxy-manager/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ COPY requirements.txt /tmp/
1313
COPY patches/*.patch /usr/src/
1414

1515
# Setup base
16-
ARG NGINX_PROXY_MANAGER_VERSION="v2.10.4"
16+
ARG NGINX_PROXY_MANAGER_VERSION="v2.12.1"
1717
# hadolint ignore=DL3003,DL3042
1818
RUN \
1919
apk add --no-cache \

proxy-manager/patches/0001-patch-data-to-config-folder.patch

Lines changed: 55 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
From ebe3b5a97cc52f1d75945b058df1e93ec92688ee Mon Sep 17 00:00:00 2001
1+
From 51dca2dc89662447fd826ec62453ab56a05a0f97 Mon Sep 17 00:00:00 2001
22
From: Franck Nijhof <[email protected]>
33
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
55

66
---
77
backend/internal/access-list.js | 2 +-
@@ -19,15 +19,16 @@ Subject: [PATCH] Patch /data to /config folder
1919
backend/templates/stream.conf | 8 ++---
2020
docker/rootfs/etc/nginx/conf.d/default.conf | 6 ++--
2121
.../include/letsencrypt-acme-challenge.conf | 2 +-
22+
.../rootfs/etc/nginx/conf.d/include/log.conf | 2 +-
2223
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(-)
2526

2627
diff --git a/backend/internal/access-list.js b/backend/internal/access-list.js
27-
index 8457792..48415d2 100644
28+
index 72326be..a7a122f 100644
2829
--- a/backend/internal/access-list.js
2930
+++ b/backend/internal/access-list.js
30-
@@ -462,7 +462,7 @@ const internalAccessList = {
31+
@@ -461,7 +461,7 @@ const internalAccessList = {
3132
* @returns {String}
3233
*/
3334
getFilename: (list) => {
@@ -37,10 +38,10 @@ index 8457792..48415d2 100644
3738

3839
/**
3940
diff --git a/backend/internal/certificate.js b/backend/internal/certificate.js
40-
index 871a280..463bcfd 100644
41+
index 34b8fdf..fb43205 100644
4142
--- a/backend/internal/certificate.js
4243
+++ b/backend/internal/certificate.js
43-
@@ -520,7 +520,7 @@ const internalCertificate = {
44+
@@ -515,7 +515,7 @@ const internalCertificate = {
4445
writeCustomCert: (certificate) => {
4546
logger.info('Writing Custom Certificate:', certificate);
4647

@@ -49,7 +50,7 @@ index 871a280..463bcfd 100644
4950

5051
return new Promise((resolve, reject) => {
5152
if (certificate.provider === 'letsencrypt') {
52-
@@ -1151,7 +1151,7 @@ const internalCertificate = {
53+
@@ -1143,7 +1143,7 @@ const internalCertificate = {
5354
}
5455

5556
// Create a test challenge file
@@ -59,7 +60,7 @@ index 871a280..463bcfd 100644
5960
fs.mkdirSync(testChallengeDir, {recursive: true});
6061
fs.writeFileSync(testChallengeFile, 'Success', {encoding: 'utf8'});
6162
diff --git a/backend/internal/nginx.js b/backend/internal/nginx.js
62-
index 77933e7..47c3b60 100644
63+
index 5f802c0..a86186d 100644
6364
--- a/backend/internal/nginx.js
6465
+++ b/backend/internal/nginx.js
6566
@@ -126,9 +126,9 @@ const internalNginx = {
@@ -74,7 +75,7 @@ index 77933e7..47c3b60 100644
7475
},
7576

7677
/**
77-
@@ -276,7 +276,7 @@ const internalNginx = {
78+
@@ -278,7 +278,7 @@ const internalNginx = {
7879

7980
return new Promise((resolve, reject) => {
8081
let template = null;
@@ -83,7 +84,7 @@ index 77933e7..47c3b60 100644
8384

8485
try {
8586
template = fs.readFileSync(__dirname + '/../templates/letsencrypt-request.conf', {encoding: 'utf8'});
86-
@@ -338,7 +338,7 @@ const internalNginx = {
87+
@@ -340,7 +340,7 @@ const internalNginx = {
8788
* @returns {Promise}
8889
*/
8990
deleteLetsEncryptRequestConfig: (certificate) => {
@@ -106,7 +107,7 @@ index d4ac67d..a7c2a31 100644
106107

107108
// Configure nginx
108109
diff --git a/backend/lib/config.js b/backend/lib/config.js
109-
index caa57fc..a04b80b 100644
110+
index f7fbdca..05fc95b 100644
110111
--- a/backend/lib/config.js
111112
+++ b/backend/lib/config.js
112113
@@ -2,7 +2,7 @@ const fs = require('fs');
@@ -156,10 +157,10 @@ index 06ca7bb..654e5e4 100644
156157
{% endif %}
157158

158159
diff --git a/backend/templates/dead_host.conf b/backend/templates/dead_host.conf
159-
index d94dff5..3c18acd 100644
160+
index 7a06469..4605a93 100644
160161
--- a/backend/templates/dead_host.conf
161162
+++ b/backend/templates/dead_host.conf
162-
@@ -7,8 +7,8 @@ server {
163+
@@ -10,8 +10,8 @@ server {
163164
{% include "_hsts.conf" %}
164165
{% include "_forced_ssl.conf" %}
165166

@@ -210,10 +211,10 @@ index 676c8a6..6bb985b 100644
210211
include conf.d/include/letsencrypt-acme-challenge.conf;
211212

212213
diff --git a/backend/templates/proxy_host.conf b/backend/templates/proxy_host.conf
213-
index 81a542e..6e6ad83 100644
214+
index d23ca46..0de6647 100644
214215
--- a/backend/templates/proxy_host.conf
215216
+++ 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;
217218
proxy_http_version 1.1;
218219
{% endif %}
219220

@@ -224,7 +225,7 @@ index 81a542e..6e6ad83 100644
224225

225226
{{ advanced_config }}
226227

227-
@@ -45,6 +45,6 @@ proxy_http_version 1.1;
228+
@@ -48,6 +48,6 @@ proxy_http_version 1.1;
228229
{% endif %}
229230

230231
# Custom
@@ -233,10 +234,10 @@ index 81a542e..6e6ad83 100644
233234
}
234235
{% endif %}
235236
diff --git a/backend/templates/redirection_host.conf b/backend/templates/redirection_host.conf
236-
index 339fe72..957ecc7 100644
237+
index 7dd3607..61ee0c2 100644
237238
--- a/backend/templates/redirection_host.conf
238239
+++ b/backend/templates/redirection_host.conf
239-
@@ -9,8 +9,8 @@ server {
240+
@@ -12,8 +12,8 @@ server {
240241
{% include "_hsts.conf" %}
241242
{% include "_forced_ssl.conf" %}
242243

@@ -247,7 +248,7 @@ index 339fe72..957ecc7 100644
247248

248249
{{ advanced_config }}
249250

250-
@@ -27,6 +27,6 @@ server {
251+
@@ -30,6 +30,6 @@ server {
251252
{% endif %}
252253

253254
# Custom
@@ -319,8 +320,18 @@ index ff2a782..0225bc5 100644
319320
}
320321

321322
# 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;
322333
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
324335
--- a/docker/rootfs/etc/nginx/nginx.conf
325336
+++ b/docker/rootfs/etc/nginx/nginx.conf
326337
@@ -1,5 +1,6 @@
@@ -330,7 +341,7 @@ index 8261833..8d3ca91 100644
330341
pid /run/nginx/nginx.pid;
331342
user npm;
332343

333-
@@ -9,13 +10,13 @@ worker_processes auto;
344+
@@ -9,16 +10,16 @@ worker_processes auto;
334345
# Enables the use of JIT for regular expressions to speed-up their processing.
335346
pcre_jit on;
336347

@@ -340,13 +351,17 @@ index 8261833..8d3ca91 100644
340351
# Includes files with directives to load dynamic modules.
341352
include /etc/nginx/modules/*.conf;
342353

354+
# Custom
355+
-include /data/nginx/custom/root_top[.]conf;
356+
+include /config/nginx/custom/root_top[.]conf;
357+
343358
events {
344359
- include /data/nginx/custom/events[.]conf;
345360
+ include /config/nginx/custom/events[.]conf;
346361
}
347362

348363
http {
349-
@@ -40,13 +41,13 @@ http {
364+
@@ -43,8 +44,8 @@ http {
350365
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
351366
proxy_set_header Accept-Encoding "";
352367
proxy_cache off;
@@ -355,15 +370,9 @@ index 8261833..8d3ca91 100644
355370
+ proxy_cache_path /tmp/nginx/cache/public levels=1:2 keys_zone=public-cache:30m max_size=192m;
356371
+ proxy_cache_path /tmp/nginx/cache/private levels=1:2 keys_zone=private-cache:5m max_size=1024m;
357372

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 {
367376
real_ip_recursive on;
368377

369378
# Custom
@@ -401,19 +410,19 @@ index 8261833..8d3ca91 100644
401410
# Custom
402411
-include /data/nginx/custom/root[.]conf;
403412
+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"
415424
},
416-
aliyun: {
425+
"active24":{
417426
--
418-
2.39.2
427+
2.42.0
419428

proxy-manager/patches/0003-patch-redirect-logs-to-docker.patch renamed to proxy-manager/patches/0002-Patch-redirect-logs-to-docker-output.patch

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
1-
From 01d546e60304dd2fbe83d447886443b492d87724 Mon Sep 17 00:00:00 2001
1+
From 58a397ae6160c8f91721d54dea789097a56b8bf9 Mon Sep 17 00:00:00 2001
22
From: Franck Nijhof <[email protected]>
33
Date: Fri, 12 Jan 2024 17:14:53 +0100
4-
Subject: [PATCH] Patch redirect logs to docker output
4+
Subject: [PATCH 2/3] Patch redirect logs to docker output
55

66
---
7-
backend/templates/dead_host.conf | 4 ++--
8-
backend/templates/default.conf | 4 ++--
9-
backend/templates/letsencrypt-request.conf | 4 ++--
10-
backend/templates/proxy_host.conf | 4 ++--
11-
backend/templates/redirection_host.conf | 4 ++--
12-
docker/rootfs/etc/nginx/conf.d/default.conf | 6 +++---
13-
docker/rootfs/etc/nginx/nginx.conf | 4 ++--
14-
7 files changed, 15 insertions(+), 15 deletions(-)
7+
backend/templates/dead_host.conf | 4 ++--
8+
backend/templates/default.conf | 4 ++--
9+
backend/templates/letsencrypt-request.conf | 4 ++--
10+
backend/templates/proxy_host.conf | 4 ++--
11+
backend/templates/redirection_host.conf | 4 ++--
12+
docker/rootfs/etc/nginx/conf.d/default.conf | 6 +++---
13+
docker/rootfs/etc/nginx/conf.d/include/log.conf | 2 +-
14+
docker/rootfs/etc/nginx/nginx.conf | 2 +-
15+
8 files changed, 15 insertions(+), 15 deletions(-)
1516

1617
diff --git a/backend/templates/dead_host.conf b/backend/templates/dead_host.conf
17-
index 3c18acd..72ecea5 100644
18+
index 4605a93..8149261 100644
1819
--- a/backend/templates/dead_host.conf
1920
+++ b/backend/templates/dead_host.conf
20-
@@ -7,8 +7,8 @@ server {
21+
@@ -10,8 +10,8 @@ server {
2122
{% include "_hsts.conf" %}
2223
{% include "_forced_ssl.conf" %}
2324

@@ -59,10 +60,10 @@ index 6bb985b..675b874 100644
5960
include conf.d/include/letsencrypt-acme-challenge.conf;
6061

6162
diff --git a/backend/templates/proxy_host.conf b/backend/templates/proxy_host.conf
62-
index 6e6ad83..a5853f1 100644
63+
index 0de6647..c3c7490 100644
6364
--- a/backend/templates/proxy_host.conf
6465
+++ b/backend/templates/proxy_host.conf
65-
@@ -19,8 +19,8 @@ proxy_set_header Connection $http_connection;
66+
@@ -22,8 +22,8 @@ proxy_set_header Connection $http_connection;
6667
proxy_http_version 1.1;
6768
{% endif %}
6869

@@ -74,10 +75,10 @@ index 6e6ad83..a5853f1 100644
7475
{{ advanced_config }}
7576

7677
diff --git a/backend/templates/redirection_host.conf b/backend/templates/redirection_host.conf
77-
index 957ecc7..a1d6bc4 100644
78+
index 61ee0c2..3377364 100644
7879
--- a/backend/templates/redirection_host.conf
7980
+++ b/backend/templates/redirection_host.conf
80-
@@ -9,8 +9,8 @@ server {
81+
@@ -12,8 +12,8 @@ server {
8182
{% include "_hsts.conf" %}
8283
{% include "_forced_ssl.conf" %}
8384

@@ -112,8 +113,18 @@ index a3dcfbd..4a6108a 100644
112113
error_log /dev/null crit;
113114
include conf.d/include/ssl-ciphers.conf;
114115
ssl_reject_handshake on;
116+
diff --git a/docker/rootfs/etc/nginx/conf.d/include/log.conf b/docker/rootfs/etc/nginx/conf.d/include/log.conf
117+
index 29f1a7a..1877713 100644
118+
--- a/docker/rootfs/etc/nginx/conf.d/include/log.conf
119+
+++ b/docker/rootfs/etc/nginx/conf.d/include/log.conf
120+
@@ -1,4 +1,4 @@
121+
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"';
122+
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"';
123+
124+
-access_log /config/logs/fallback_access.log proxy;
125+
+access_log /proc/1/fd/1 proxy;
115126
diff --git a/docker/rootfs/etc/nginx/nginx.conf b/docker/rootfs/etc/nginx/nginx.conf
116-
index 8d3ca91..fdd4138 100644
127+
index ae96614..522a699 100644
117128
--- a/docker/rootfs/etc/nginx/nginx.conf
118129
+++ b/docker/rootfs/etc/nginx/nginx.conf
119130
@@ -10,7 +10,7 @@ worker_processes auto;
@@ -125,15 +136,6 @@ index 8d3ca91..fdd4138 100644
125136

126137
# Includes files with directives to load dynamic modules.
127138
include /etc/nginx/modules/*.conf;
128-
@@ -47,7 +47,7 @@ http {
129-
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"';
130-
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"';
131-
132-
- access_log /config/logs/fallback_access.log proxy;
133-
+ access_log /proc/1/fd/1 proxy;
134-
135-
# Dynamically generated resolvers file
136-
include /etc/nginx/conf.d/include/resolvers.conf;
137139
--
138-
2.39.2
140+
2.42.0
139141

proxy-manager/patches/0002-patch-sass-version-in-frontend.patch

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)