Nginx SNI and Letsencrypt on FreeBSD; Wrong certificate?

NuLL3rr0r nginx-forum at
Sun Sep 4 11:07:28 UTC 2016

Ops! Thank you so much Maxim. You are right! Reading your response again, I
just figured it out. Adding the following block solved the issue:

server {
    server_tokens   off;

    listen          443 ssl http2;
    listen          [::]:443 ssl http2;

    # Hardened SSL
    include                 /path/to/snippets/hardened-ssl;
    ssl_certificate         /path/to/certs/;
    ssl_certificate_key     /path/to/keys/;
    ssl_trusted_certificate /path/to/certs/;

    return 301 https://www.$server_name$request_uri;  # enforce www

Posted at Nginx Forum:,269263,269381#msg-269381

More information about the nginx mailing list