summaryrefslogtreecommitdiff
path: root/nginx
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2020-11-14 04:05:35 -0500
committerDaniel Micay <danielmicay@gmail.com>2020-11-14 04:23:19 -0500
commitdbee9a704c6960a1501325240005dc9bf5c3d73e (patch)
tree909f48b46f8ac6f6911667ed07bc200e03a179e5 /nginx
parent68b323b8d55c4a1828dcd09bf86a2d9531461965 (diff)
move TLS configuration into nginx.conf
Diffstat (limited to 'nginx')
-rw-r--r--nginx/nginx.conf23
-rw-r--r--nginx/snippets/https.conf13
-rw-r--r--nginx/ssl-dhparams.pem11
3 files changed, 31 insertions, 16 deletions
diff --git a/nginx/nginx.conf b/nginx/nginx.conf
index eb3d6fe6..a38bea44 100644
--- a/nginx/nginx.conf
+++ b/nginx/nginx.conf
@@ -22,6 +22,20 @@ http {
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
+ ssl_certificate /etc/letsencrypt/live/grapheneos.org/fullchain.pem;
+ ssl_certificate_key /etc/letsencrypt/live/grapheneos.org/privkey.pem;
+ ssl_dhparam /etc/nginx/ssl-dhparams.pem;
+ ssl_session_cache shared:SSL:10m;
+ ssl_session_timeout 1d;
+ ssl_session_tickets 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;
+
+ ssl_trusted_certificate /etc/letsencrypt/live/grapheneos.org/chain.pem;
+ ssl_stapling on;
+ ssl_stapling_verify on;
+ # maintained by certbot-ocsp-fetcher
+ ssl_stapling_file /etc/nginx/ocsp-cache/grapheneos.org.der;
+
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
@@ -39,7 +53,8 @@ http {
}
server {
- include /etc/nginx/snippets/https.conf;
+ listen 443 ssl http2;
+ listen [::]:443 ssl http2;
server_name www.grapheneos.org;
root /var/empty;
@@ -50,7 +65,8 @@ http {
}
server {
- include /etc/nginx/snippets/https.conf;
+ listen 443 ssl http2;
+ listen [::]:443 ssl http2;
server_name grapheneos.org;
root /var/www/html;
@@ -165,7 +181,8 @@ http {
}
server {
- include /etc/nginx/snippets/https.conf;
+ listen 443 ssl http2;
+ listen [::]:443 ssl http2;
server_name mta-sts.grapheneos.org mta-sts.mail.grapheneos.org;
root /var/www/mta-sts;
diff --git a/nginx/snippets/https.conf b/nginx/snippets/https.conf
deleted file mode 100644
index a721e373..00000000
--- a/nginx/snippets/https.conf
+++ /dev/null
@@ -1,13 +0,0 @@
-listen 443 ssl http2;
-listen [::]:443 ssl http2;
-
-ssl_certificate /etc/letsencrypt/live/grapheneos.org/fullchain.pem;
-ssl_certificate_key /etc/letsencrypt/live/grapheneos.org/privkey.pem;
-include /etc/letsencrypt/options-ssl-nginx.conf;
-ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
-
-ssl_trusted_certificate /etc/letsencrypt/live/grapheneos.org/chain.pem;
-ssl_stapling on;
-ssl_stapling_verify on;
-# maintained by certbot-ocsp-fetcher
-ssl_stapling_file /etc/nginx/ocsp-cache/grapheneos.org.der;
diff --git a/nginx/ssl-dhparams.pem b/nginx/ssl-dhparams.pem
new file mode 100644
index 00000000..fb31ccda
--- /dev/null
+++ b/nginx/ssl-dhparams.pem
@@ -0,0 +1,11 @@
+-----BEGIN DH PARAMETERS-----
+MIIBiAKCAYEA//////////+t+FRYortKmq/cViAnPTzx2LnFg84tNpWp4TZBFGQz
++8yTnc4kmz75fS/jY2MMddj2gbICrsRhetPfHtXV/WVhJDP1H18GbtCFY2VVPe0a
+87VXE15/V8k1mE8McODmi3fipona8+/och3xWKE2rec1MKzKT0g6eXq8CrGCsyT7
+YdEIqUuyyOP7uWrat2DX9GgdT0Kj3jlN9K5W7edjcrsZCwenyO4KbXCeAvzhzffi
+7MA0BM0oNC9hkXL+nOmFg/+OTxIy7vKBg8P+OxtMb61zO7X8vC7CIAXFjvGDfRaD
+ssbzSibBsu/6iGtCOGEfz9zeNVs7ZRkDW7w09N75nAI4YbRvydbmyQd62R0mkff3
+7lmMsPrBhtkcrv4TCYUTknC0EwyTvEN5RPT9RFLi103TZPLiHnH1S/9croKrnJ32
+nuhtK8UiNjoNq8Uhl5sN6todv5pC1cRITgq80Gv6U93vPBsg7j/VnXwl5B0rZsYu
+N///////////AgEC
+-----END DH PARAMETERS-----