Add dehydrated + updated nginx confs

This commit is contained in:
Livvy Mackintosh 2017-05-19 02:23:18 +02:00
parent 8248d1690a
commit b5f56effbf
4 changed files with 81 additions and 27 deletions

View File

@ -1,27 +0,0 @@
server {
listen 80; listen [::]:80;
server_name forum.example.com; # <-- change this
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2; listen [::]:443 ssl http2;
server_name forum.ojuso.org; # <-- change this
ssl on;
ssl_certificate /web/certs/forum.ojuso.org/forum.ojuso.org.cer;
ssl_certificate_key /web/certs/forum.ojuso.org/forum.ojuso.org.key;
ssl_session_tickets off;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:ECDHE-RSA-DES-CBC3-SHA:ECDHE-ECDSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA;
http2_idle_timeout 5m; # up from 3m default
location / {
proxy_pass http://unix:/containers/forum/http.sock:;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
}

1
support/dehydrated Submodule

@ -0,0 +1 @@
Subproject commit 116386486b3749e4c5e1b4da35904f30f8b2749b

View File

@ -0,0 +1,18 @@
# TLS Directive
ssl_session_timeout 1d;
ssl_session_cache shared:SSL:50m;
ssl_session_tickets off;
## Protocols and ciphers
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS';
ssl_prefer_server_ciphers on;
## HSTS
add_header Strict-Transport-Security max-age=15768000;
## Stapling
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.8.8;

View File

@ -0,0 +1,62 @@
server {
listen 80; listen [::]:80;
server_name _;
location /.well-known/acme-challenge {
alias /web/acme;
}
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name map.ojuso.org;
ssl_certificate /web/certs/map.ojuso.org/fullchain.pem;
ssl_certificate_key /web/certs/map.ojuso.org/privkey.pem;
ssl_dhparam /web/certs/dhparam.pem;
ssl_trusted_certificate /web/certs/map.ojuso.org/chain.pem;
include directives/*;
location /static/ {
alias /web/static/;
expires 30d;
}
location / {
proxy_pass http://map:8000;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name forum.ojuso.org;
ssl_certificate /web/certs/forum.ojuso.org/fullchain.pem;
ssl_certificate_key /web/certs/forum.ojuso.org/privkey.pem;
ssl_dhparam /web/certs/dhparam.pem;
ssl_trusted_certificate /web/certs/map.ojuso.org/chain.pem;
include directives/*;
http2_idle_timeout 5m;
location / {
proxy_pass http://unix:/web/run/discourse.sock:;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
}
}