docker_images/nginx/root.conf

37 lines
1.2 KiB
Plaintext
Raw Normal View History

2016-10-04 09:32:47 +02:00
server {
2017-07-01 15:48:03 +02:00
listen ${NGINX_PORT} default_server;
2017-07-01 15:55:22 +02:00
listen ${NGINX_SSL_PORT} ssl default_server;
2016-10-04 09:32:47 +02:00
server_name ${NGINX_HOST};
ssl_certificate /etc/nginx/certs/req.pem;
ssl_certificate_key /etc/nginx/certs/cert.key;
ssl_protocols TLSv1.2 TLSv1.3; # dont use SSLv3 ref: POODLE, nor TLSv1 / TLSv1.1
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_prefer_server_ciphers off;
2016-10-04 09:32:47 +02:00
ssl_dhparam /etc/nginx/certs/dhparams.pem; # Logjam
ssl_session_timeout 1d;
ssl_session_tickets off;
ssl_session_cache shared:TLS:10m; # About 40k sessions
# OCSP stapling
ssl_stapling on;
ssl_stapling_verify on;
# Set HSTS to 365 days
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains' always;
# resolver 127.0.0.1;
# DDoS
client_body_buffer_size 1K;
client_header_buffer_size 1k;
client_max_body_size 1k;
large_client_header_buffers 2 1k;
2016-10-04 09:32:47 +02:00
location / {
root /var/www/html;
index index.html index.htm index.php;
}
}