You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
1.1 KiB

server {
listen [::]:443 default_server ssl;
listen 443 default_server ssl;
listen [::]:80 default_server;
listen 80 default_server;
server_name _;
access_log /var/log/nginx/default.access.log;
error_log /var/log/nginx/default.error.log;
# Generate a self-signed cert and key: "sudo openssl req -x509 -nodes -days 3650 -newkey rsa:4096 -keyout /etc/ssl/private/nginx-selfsigned.key -out /etc/ssl/certs/nginx-selfsigned.crt"
ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
# Generate a strong DH Param (can take 10 mins): "sudo openssl dhparam 4096 -out /etc/ssl/dhparam.pem"
ssl_dhparam /etc/ssl/dhparam.pem;
ssl_protocols TLSv1.3 TLSv1.2 TLSv1.1;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:TLS:2m;
# Everything is a 404
location / {
return 404;