Skip to content

Commit 0b99009

Browse files
authored
v5.1.8 (#127)
Minor updates * Using latest base image * Using PROXY_HARDEN to generate ssl configuration
1 parent 410d695 commit 0b99009

File tree

7 files changed

+51
-4
lines changed

7 files changed

+51
-4
lines changed

Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM bfren/nginx:nginx1.22-4.0.21
1+
FROM bfren/nginx:nginx1.22-4.0.22
22

33
LABEL org.opencontainers.image.source="https://github.com/bfren/docker-nginx-proxy"
44

@@ -13,12 +13,14 @@ ENV \
1313
PROXY_URI= \
1414
# clean all config and certificates before doing anything else
1515
PROXY_CLEAN_INSTALL=0 \
16+
# enable automatic certificate updating
17+
PROXY_ENABLE_AUTO_UPDATE=1 \
18+
# use hardened mode (remove old / insecure ciphers and protocols)
19+
PROXY_HARDEN=0 \
1620
# used for renewal notification emails
1721
PROXY_LETS_ENCRYPT_EMAIL= \
1822
# set to 1 to use live instead of staging server
1923
PROXY_LETS_ENCRYPT_LIVE=0 \
20-
# enable automatic certificate updating
21-
PROXY_ENABLE_AUTO_UPDATE=1 \
2224
# set to the number of bits to use for generating private key
2325
PROXY_SSL_KEY_BITS=4096 \
2426
# set to the number of bits to use for generating DHPARAM

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ For SSL certificate requests to work correctly, ports 80 and 443 need mapping fr
3838
| ------------------------------------ | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
3939
| `PROXY_URI` | URI | The base URI of the proxy server - will be used to handle unbound requests. | *None* - **required** |
4040
| `PROXY_CLEAN_INSTALL` | 0 or 1 | If 1, all Nginx and SSL configuration and certificates will be deleted and regenerated. | 0 |
41+
| `PROXY_HARDEN` | 0 or 1 | If 1, only modern SSL ciphers and protocols will be enabled (some older devices may not be able to access it). | 0 |
4142
| `PROXY_LETS_ENCRYPT_EMAIL` | A valid email address | Used by Lets Encrypt for notification emails. | *None* - **required** |
4243
| `PROXY_LETS_ENCRYPT_LIVE` | 0 or 1 | Only set to 1 (to request live certificates) when your config is correct - Lets Encrypt rate limit certificate requests. | 0 |
4344
| `PROXY_SSL_DHPARAM_BITS` | A valid integer | The size of your DHPARAM variables - adjust down only if you have limited processing resources. | 4096 |

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.1.7
1+
5.1.8

overlay/etc/bf/init.d/21-ssl-conf

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/command/with-contenv bash
2+
3+
set -euo pipefail
4+
export BF_E=`basename ${0}`
5+
6+
7+
#======================================================================================================================
8+
# Generate SSL configuration file.
9+
#======================================================================================================================
10+
11+
if [ "${PROXY_HARDEN}" = "1" ] ; then
12+
TEMPLATE="modern"
13+
else
14+
TEMPLATE="intermediate"
15+
fi
16+
17+
bf-echo "Using ${TEMPLATE} SSL configuration."
18+
bf-esh ${BF_TEMPLATES}/ssl-${TEMPLATE}.conf.esh /etc/nginx/http.d/ssl.conf
19+
bf-done
File renamed without changes.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#======================================================================================================================
2+
# SSL
3+
# Using Mozilla's SSL Configuration Generator with 'Intermediate' settings - https://ssl-config.mozilla.org/
4+
#======================================================================================================================
5+
6+
ssl_protocols TLSv1.2 TLSv1.3;
7+
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
8+
ssl_prefer_server_ciphers off;
9+
ssl_session_timeout 1d;
10+
ssl_session_cache shared:MozSSL:10m;
11+
ssl_session_tickets off;
12+
ssl_stapling on;
13+
ssl_stapling_verify on;
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#======================================================================================================================
2+
# SSL
3+
# Using Mozilla's SSL Configuration Generator with 'Modern' settings - https://ssl-config.mozilla.org/
4+
#======================================================================================================================
5+
6+
ssl_protocols TLSv1.3;
7+
ssl_prefer_server_ciphers off;
8+
ssl_session_timeout 1d;
9+
ssl_session_cache shared:MozSSL:10m;
10+
ssl_session_tickets off;
11+
ssl_stapling on;
12+
ssl_stapling_verify on;

0 commit comments

Comments
 (0)