From 6345504cfe8393a540ae9ce6ec9441eda7d5c43d Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 20 Nov 2022 15:27:20 +0800 Subject: Continue to fix nginx. --- template/nginx/forbid_unknown_domain.conf | 2 -- template/nginx/reverse-proxy.conf.template | 3 --- template/nginx/root.conf.template | 3 --- template/nginx/ssl.conf | 14 -------------- template/nginx/ssl.conf.template | 17 +++++++++++++++++ template/nginx/static-file.conf.template | 3 --- 6 files changed, 17 insertions(+), 25 deletions(-) delete mode 100644 template/nginx/ssl.conf create mode 100644 template/nginx/ssl.conf.template (limited to 'template/nginx') diff --git a/template/nginx/forbid_unknown_domain.conf b/template/nginx/forbid_unknown_domain.conf index ae96393..661a2b6 100644 --- a/template/nginx/forbid_unknown_domain.conf +++ b/template/nginx/forbid_unknown_domain.conf @@ -1,8 +1,6 @@ server { listen 80 default_server; listen [::]:80 default_server; - listen 443 ssl http2 default_server; - listen [::]:443 ssl http2 default_server; return 444; } diff --git a/template/nginx/reverse-proxy.conf.template b/template/nginx/reverse-proxy.conf.template index d7eebdf..3526471 100644 --- a/template/nginx/reverse-proxy.conf.template +++ b/template/nginx/reverse-proxy.conf.template @@ -7,9 +7,6 @@ server { listen [::]:443 ssl http2; server_name ${CRUPEST_NGINX_SUBDOMAIN}.${CRUPEST_DOMAIN}; - ssl_certificate /etc/letsencrypt/live/${CRUPEST_DOMAIN}/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/${CRUPEST_DOMAIN}/privkey.pem; - location / { proxy_pass http://${CRUPEST_NGINX_UPSTREAM_NAME}; proxy_http_version 1.1; diff --git a/template/nginx/root.conf.template b/template/nginx/root.conf.template index a6992c7..8214bf7 100644 --- a/template/nginx/root.conf.template +++ b/template/nginx/root.conf.template @@ -3,9 +3,6 @@ server { listen [::]:443 ssl http2; server_name ${CRUPEST_DOMAIN}; - ssl_certificate /etc/letsencrypt/live/${CRUPEST_DOMAIN}/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/${CRUPEST_DOMAIN}/privkey.pem; - root /srv/www; } diff --git a/template/nginx/ssl.conf b/template/nginx/ssl.conf deleted file mode 100644 index f2aadba..0000000 --- a/template/nginx/ssl.conf +++ /dev/null @@ -1,14 +0,0 @@ -# This file contains important security parameters. If you modify this file -# manually, Certbot will be unable to automatically provide future security -# updates. Instead, Certbot will print and log an error message with a path to -# the up-to-date file that you will need to refer to when manually updating -# this file. Contents are based on https://ssl-config.mozilla.org - -ssl_session_cache shared:le_nginx_SSL:10m; -ssl_session_timeout 1440m; -ssl_session_tickets off; - -ssl_protocols TLSv1.2 TLSv1.3; -ssl_prefer_server_ciphers off; - -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"; diff --git a/template/nginx/ssl.conf.template b/template/nginx/ssl.conf.template new file mode 100644 index 0000000..54205f1 --- /dev/null +++ b/template/nginx/ssl.conf.template @@ -0,0 +1,17 @@ +# This file contains important security parameters. If you modify this file +# manually, Certbot will be unable to automatically provide future security +# updates. Instead, Certbot will print and log an error message with a path to +# the up-to-date file that you will need to refer to when manually updating +# this file. Contents are based on https://ssl-config.mozilla.org + +ssl_certificate /etc/letsencrypt/live/${CRUPEST_DOMAIN}/fullchain.pem; +ssl_certificate_key /etc/letsencrypt/live/${CRUPEST_DOMAIN}/privkey.pem; + +ssl_session_cache shared:le_nginx_SSL:10m; +ssl_session_timeout 1440m; +ssl_session_tickets off; + +ssl_protocols TLSv1.2 TLSv1.3; +ssl_prefer_server_ciphers off; + +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"; diff --git a/template/nginx/static-file.conf.template b/template/nginx/static-file.conf.template index 1597d10..0ada7cd 100644 --- a/template/nginx/static-file.conf.template +++ b/template/nginx/static-file.conf.template @@ -3,9 +3,6 @@ server { listen [::]:443 ssl http2; server_name ${CRUPEST_NGINX_SUBDOMAIN}.${CRUPEST_DOMAIN}; - ssl_certificate /etc/letsencrypt/live/${CRUPEST_DOMAIN}/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/${CRUPEST_DOMAIN}/privkey.pem; - root ${CRUPEST_NGINX_ROOT}; client_max_body_size 5G; -- cgit v1.2.3