2015-01-13 20:19:42 +00:00
|
|
|
# vim: ft=nginx
|
|
|
|
|
2014-04-07 05:20:09 +00:00
|
|
|
include root-base.conf;
|
|
|
|
|
2017-02-13 19:14:44 +00:00
|
|
|
{% if use_https %}
|
|
|
|
|
2014-04-07 05:20:09 +00:00
|
|
|
http {
|
|
|
|
include http-base.conf;
|
|
|
|
include hosted-http-base.conf;
|
2015-01-13 20:19:42 +00:00
|
|
|
include rate-limiting.conf;
|
|
|
|
|
2019-01-15 17:39:05 +00:00
|
|
|
server_names_hash_bucket_size 64;
|
|
|
|
|
2017-02-14 23:09:56 +00:00
|
|
|
resolver 127.0.0.1 valid=10s;
|
|
|
|
|
2018-07-24 17:15:19 +00:00
|
|
|
vhost_traffic_status_zone;
|
|
|
|
|
2015-08-07 16:03:05 +00:00
|
|
|
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: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';
|
2015-05-22 20:25:28 +00:00
|
|
|
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
|
2017-09-05 22:02:07 +00:00
|
|
|
ssl_session_cache shared:SSL:60m;
|
|
|
|
ssl_session_timeout 2h;
|
|
|
|
ssl_session_tickets on;
|
2015-05-22 20:25:28 +00:00
|
|
|
ssl_prefer_server_ciphers on;
|
2015-08-07 16:03:05 +00:00
|
|
|
ssl_dhparam dhparams.pem;
|
2015-05-22 20:25:28 +00:00
|
|
|
|
2019-03-01 20:32:39 +00:00
|
|
|
# TODO: learn OCSP stapling and do it the right way
|
2015-07-14 21:33:57 +00:00
|
|
|
#ssl_stapling on;
|
|
|
|
#ssl_stapling_verify off;
|
2016-08-13 17:53:04 +00:00
|
|
|
#ssl_trusted_certificate ../stack/ssl.key;
|
2015-07-14 21:33:57 +00:00
|
|
|
|
2014-04-07 05:20:09 +00:00
|
|
|
server {
|
2018-08-31 17:58:34 +00:00
|
|
|
server_name _;
|
|
|
|
|
|
|
|
ssl_certificate ../stack/ssl.cert;
|
|
|
|
ssl_certificate_key ../stack/ssl.key;
|
|
|
|
|
2014-04-07 05:20:09 +00:00
|
|
|
include server-base.conf;
|
|
|
|
|
2015-12-04 22:06:55 +00:00
|
|
|
listen 443 ssl http2 default;
|
2015-05-22 17:35:49 +00:00
|
|
|
|
2014-04-07 05:20:09 +00:00
|
|
|
ssl on;
|
2015-05-22 17:35:49 +00:00
|
|
|
|
2015-05-22 17:54:43 +00:00
|
|
|
# This header must be set only for HTTPS
|
2015-05-22 17:35:49 +00:00
|
|
|
add_header Strict-Transport-Security "max-age=63072000; preload";
|
2016-11-28 21:29:35 +00:00
|
|
|
|
|
|
|
access_log /dev/stdout lb_logs;
|
2014-04-07 05:20:09 +00:00
|
|
|
}
|
2015-01-22 17:58:48 +00:00
|
|
|
|
|
|
|
server {
|
2019-01-15 20:22:59 +00:00
|
|
|
server_name _;
|
2018-08-31 17:58:34 +00:00
|
|
|
|
2019-01-15 20:22:59 +00:00
|
|
|
ssl_certificate ../stack/ssl.cert;
|
|
|
|
ssl_certificate_key ../stack/ssl.key;
|
2018-08-31 17:58:34 +00:00
|
|
|
|
2019-01-15 20:22:59 +00:00
|
|
|
include server-base.conf;
|
2018-08-31 17:58:34 +00:00
|
|
|
|
2019-01-15 20:22:59 +00:00
|
|
|
listen 8443 ssl http2 default proxy_protocol;
|
2018-08-31 17:58:34 +00:00
|
|
|
ssl on;
|
|
|
|
|
|
|
|
# This header must be set only for HTTPS
|
|
|
|
add_header Strict-Transport-Security "max-age=63072000; preload";
|
|
|
|
|
2019-01-15 20:22:59 +00:00
|
|
|
real_ip_header proxy_protocol;
|
|
|
|
|
2018-08-31 17:58:34 +00:00
|
|
|
access_log /dev/stdout lb_logs;
|
|
|
|
}
|
|
|
|
|
2019-01-15 20:22:59 +00:00
|
|
|
{% if v1_only_domain %}
|
|
|
|
server {
|
|
|
|
include server-base.conf;
|
2018-08-31 17:58:34 +00:00
|
|
|
|
2019-01-15 20:22:59 +00:00
|
|
|
server_name {{ v1_only_domain }};
|
|
|
|
|
|
|
|
{% if use_old_certs %}
|
|
|
|
ssl_certificate ../stack/ssl.old.cert;
|
|
|
|
ssl_certificate_key ../stack/ssl.old.key;
|
|
|
|
{% else %}
|
2018-08-31 17:58:34 +00:00
|
|
|
ssl_certificate ../stack/ssl.cert;
|
|
|
|
ssl_certificate_key ../stack/ssl.key;
|
2019-01-15 20:22:59 +00:00
|
|
|
{% endif %}
|
2018-08-31 17:58:34 +00:00
|
|
|
|
2019-01-15 20:22:59 +00:00
|
|
|
listen 443 ssl;
|
2018-08-31 17:58:34 +00:00
|
|
|
|
2015-01-22 17:58:48 +00:00
|
|
|
ssl on;
|
2015-05-22 17:35:49 +00:00
|
|
|
|
2015-05-22 17:54:43 +00:00
|
|
|
# This header must be set only for HTTPS
|
2015-05-22 17:35:49 +00:00
|
|
|
add_header Strict-Transport-Security "max-age=63072000; preload";
|
2015-06-16 16:14:22 +00:00
|
|
|
|
2016-11-28 21:29:35 +00:00
|
|
|
access_log /dev/stdout lb_logs;
|
2015-01-22 17:58:48 +00:00
|
|
|
}
|
2018-07-24 17:15:19 +00:00
|
|
|
|
2018-09-06 17:59:21 +00:00
|
|
|
server {
|
2019-01-15 20:22:59 +00:00
|
|
|
server_name {{ v1_only_domain }};
|
2018-09-06 17:59:21 +00:00
|
|
|
|
2019-01-15 20:22:59 +00:00
|
|
|
{% if use_old_certs %}
|
2018-09-06 17:59:21 +00:00
|
|
|
ssl_certificate ../stack/ssl.old.cert;
|
|
|
|
ssl_certificate_key ../stack/ssl.old.key;
|
2019-01-15 20:22:59 +00:00
|
|
|
{% else %}
|
|
|
|
ssl_certificate ../stack/ssl.cert;
|
|
|
|
ssl_certificate_key ../stack/ssl.key;
|
|
|
|
{% endif %}
|
2018-09-06 17:59:21 +00:00
|
|
|
|
|
|
|
include server-base.conf;
|
|
|
|
|
|
|
|
listen 8443 ssl proxy_protocol;
|
|
|
|
ssl on;
|
|
|
|
|
|
|
|
# This header must be set only for HTTPS
|
|
|
|
add_header Strict-Transport-Security "max-age=63072000; preload";
|
|
|
|
|
|
|
|
real_ip_header proxy_protocol;
|
|
|
|
|
|
|
|
access_log /dev/stdout lb_logs;
|
|
|
|
}
|
2019-01-15 20:22:59 +00:00
|
|
|
{% endif %}
|
2018-09-06 17:59:21 +00:00
|
|
|
|
2014-04-07 05:20:09 +00:00
|
|
|
}
|
2017-02-13 19:14:44 +00:00
|
|
|
|
|
|
|
{% else %}
|
|
|
|
|
|
|
|
http {
|
|
|
|
include http-base.conf;
|
|
|
|
include rate-limiting.conf;
|
|
|
|
|
2017-02-14 23:09:56 +00:00
|
|
|
resolver 127.0.0.1 valid=10s;
|
|
|
|
|
2017-02-13 19:14:44 +00:00
|
|
|
server {
|
|
|
|
include server-base.conf;
|
|
|
|
|
|
|
|
listen 80 default;
|
|
|
|
|
|
|
|
access_log /dev/stdout lb_logs;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
{% endif %}
|