0

The nginx tries to access the key at /etc/nginx which is wrong, because nginx or openssl allows to use variables. Did I use/set it wrong?

server {
        listen 80 default_server;
        listen [::]:80 default_server;

        index main.html index.html index.htm index.nginx-debian.html;
        server_name   ~^(?<pre>.+\.)?(?<domain>.+)\.(?<post>.+)$ _;

        listen [::]:443 ssl http2 ipv6only=on; # managed by Certbot
        listen 443 ssl http2; # managed by Certbot
        listen 8448 ssl http2;
        listen [::]:8448 ssl http2 ipv6only=on;
        ssl_certificate /etc/letsencrypt/live/$domain.$post/fullchain.pem; # managed by Certbot
        ssl_certificate_key /etc/letsencrypt/live/$domain.$post/privkey.pem; # managed by Certbot
        include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
        ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
rubynt
  • 1
  • 1
    Unfortunately, I think you need to use variables which are available during SNI negotiation. Which probably limits you to `$ssl_server_name` as shown in the [documentation](http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_certificate). – Richard Smith Nov 04 '22 at 21:18

0 Answers0