server { listen *:80; server_name turn.example.org; access_log off; autoindex off; location ^~ /.well-known/acme-challenge/ { default_type "text/plain"; root /var/www; } location = /.well-known/acme-challenge/ { return 404; } location / { return 301 https://$host$request_uri; } } server { listen 127.0.0.1:4443 ssl http2; server_name turn.example.org; ssl_certificate /etc/nginx/ssl/turn.example.org.pem; ssl_certificate_key /etc/nginx/ssl/turn.example.org.key; client_max_body_size 8m; charset utf-8; access_log /var/log/nginx/turn.example.org.access_log main; error_log /var/log/nginx/turn.example.org.error_log warn; autoindex off; root /var/www; }