-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The distinction between server TLS and proxy TLS configuration wasn't clear and partially wrong. - use separate environment variables for configuring server TLS / proxy TLS - update documentation on environment variables Fixes #166
- Loading branch information
Showing
14 changed files
with
305 additions
and
217 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,19 +64,19 @@ ARG LUA_VERSION="n/a" | |
LABEL maintainer="Felipe Zipitria <[email protected]>" | ||
|
||
ENV APACHE_ALWAYS_TLS_REDIRECT=off \ | ||
APACHE_LOGFORMAT='"%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""' \ | ||
APACHE_ERRORLOG_FORMAT='"[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i"' \ | ||
APACHE_METRICS_LOGFORMAT='"%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""' \ | ||
ACCESSLOG=/var/log/apache2/access.log \ | ||
BACKEND=http://localhost:80 \ | ||
BACKEND_WS=ws://localhost:8080 \ | ||
ERRORLOG='/proc/self/fd/2' \ | ||
APACHE_LOGFORMAT='"%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""' \ | ||
APACHE_ERRORLOG_FORMAT='"[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% ,\ referer\ %{Referer}i"' \ | ||
APACHE_METRICS_LOGFORMAT='"%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\""' \ | ||
H2_PROTOCOLS='h2 http/1.1' \ | ||
LOGLEVEL=warn \ | ||
METRICS_ALLOW_FROM='127.0.0.0/255.0.0.0 ::1/128' \ | ||
METRICS_DENY_FROM='All' \ | ||
METRICSLOG='/dev/null' \ | ||
MUTEX='default' \ | ||
METRICSLOG='/dev/null' \ | ||
MODSEC_AUDIT_ENGINE="RelevantOnly" \ | ||
MODSEC_AUDIT_LOG_FORMAT=JSON \ | ||
MODSEC_AUDIT_LOG_TYPE=Serial \ | ||
|
@@ -110,26 +110,28 @@ ENV APACHE_ALWAYS_TLS_REDIRECT=off \ | |
PORT=80 \ | ||
PROXY_ERROR_OVERRIDE=on \ | ||
PROXY_PRESERVE_HOST=on \ | ||
PROXY_SSL=on \ | ||
PROXY_SSL_CA_CERT=/etc/ssl/certs/ca-certificates.crt \ | ||
PROXY_SSL_CERT_KEY=/usr/local/apache2/conf/server.key \ | ||
PROXY_SSL_CERT=/usr/local/apache2/conf/server.crt \ | ||
PROXY_SSL_CERT=/usr/local/apache2/conf/proxy.crt \ | ||
PROXY_SSL_CERT_KEY=/usr/local/apache2/conf/proxy.key \ | ||
PROXY_SSL_CHECK_PEER_NAME=off \ | ||
PROXY_SSL_CIPHER_SUITE="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" \ | ||
PROXY_SSL_PROTOCOL="all -SSLv3 -TLSv1 -TLSv1.1" \ | ||
PROXY_SSL_VERIFY=none \ | ||
PROXY_SSL=on \ | ||
PROXY_TIMEOUT=60 \ | ||
REMOTEIP_INT_PROXY='10.1.0.0/16' \ | ||
REQ_HEADER_FORWARDED_PROTO='https' \ | ||
SERVER_ADMIN=root@localhost \ | ||
SERVER_NAME=localhost \ | ||
SERVER_SIGNATURE=Off \ | ||
SERVER_TOKENS=Full \ | ||
SSL_CERT=/usr/local/apache2/conf/server.crt \ | ||
SSL_CERT_KEY=/usr/local/apache2/conf/server.key \ | ||
SSL_CIPHER_SUITE="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" \ | ||
SSL_ENGINE=on \ | ||
SSL_HONOR_CIPHER_ORDER=off \ | ||
SSL_PORT=443 \ | ||
SSL_PROTOCOL="all -SSLv3 -TLSv1 -TLSv1.1" \ | ||
SSL_PROXY_PROTOCOL="all -SSLv3 -TLSv1 -TLSv1.1" \ | ||
SSL_PROXY_CIPHER_SUITE="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" \ | ||
SSL_SESSION_TICKETS=off \ | ||
SSL_USE_STAPLING=On \ | ||
TIMEOUT=60 \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
# vim:sw=2:ts=2:sts=2:et | ||
|
||
set -eu | ||
|
||
LC_ALL=C | ||
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin | ||
|
||
PROXY_SSL_CONFIG="" | ||
if [ "${PROXY_SSL}" = "on" ]; then | ||
PROXY_SSL_CONFIG="include includes/proxy_backend_ssl.conf;" | ||
fi | ||
|
||
sed -i.bak -r 's#PROXY_SSL_CONFIG#'"${PROXY_SSL_CONFIG}"'#' /etc/nginx/conf.d/default.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
proxy_ssl_certificate ${PROXY_SSL_CERT}; | ||
proxy_ssl_certificate_key ${PROXY_SSL_CERT_KEY}; | ||
|
||
proxy_ssl_protocols ${PROXY_SSL_PROTOCOLS}; | ||
proxy_ssl_ciphers ${PROXY_SSL_CIPHERS}; | ||
|
||
proxy_ssl_verify ${PROXY_SSL_VERIFY}; | ||
proxy_ssl_verify_depth ${PROXY_SSL_VERIFY_DEPTH}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters