feat: always overwrite the dokku.conf file for nginx
This is necessary as sometimes older config is shipped with Dokku, meaning that security directives - amongst others - are not properly updated. Refs #3342
This commit is contained in:
@@ -34,11 +34,9 @@ if [[ ! -f /etc/nginx/dhparam.pem ]]; then
|
|||||||
chown root:root /etc/nginx/dhparam.pem
|
chown root:root /etc/nginx/dhparam.pem
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if dokku.conf has not been created, create it
|
mkdir -p /etc/nginx/conf.d
|
||||||
if [[ ! -f /etc/nginx/conf.d/dokku.conf ]]; then
|
chown root:root /etc/nginx/conf.d
|
||||||
mkdir -p /etc/nginx/conf.d
|
cat<<EOF > /etc/nginx/conf.d/dokku.conf
|
||||||
chown root:root /etc/nginx/conf.d
|
|
||||||
cat<<EOF > /etc/nginx/conf.d/dokku.conf
|
|
||||||
include $DOKKU_ROOT/*/nginx.conf;
|
include $DOKKU_ROOT/*/nginx.conf;
|
||||||
|
|
||||||
server_tokens off;
|
server_tokens off;
|
||||||
@@ -52,7 +50,6 @@ ssl_dhparam /etc/nginx/dhparam.pem;
|
|||||||
ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS;
|
ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS;
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
fi
|
|
||||||
|
|
||||||
# allow users to override their server_names_hash_bucket_size
|
# allow users to override their server_names_hash_bucket_size
|
||||||
if [[ ! -f /etc/nginx/conf.d/server_names_hash_bucket_size.conf ]]; then
|
if [[ ! -f /etc/nginx/conf.d/server_names_hash_bucket_size.conf ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user