server {
if ($host = hostname.tld) {
return 301 https://$host$request_uri;
}
listen 80 default_server;
listen [::]:80 default_server;
server_name hostname.tld;
server_tokens off;
location /.well-known/acme-challenge/ {
root /var/www/html;
try_files $uri =404;
}
return 404;
}
No comments:
Post a Comment