Using $host variable in ssl_certificate path

dimitre nginx-forum at forum.nginx.org
Wed Oct 20 16:00:36 UTC 2021


hello, I'm trying to use the variable $host in this entry: 

ssl_certificate /etc/letsencrypt/live/$host/fullchain.pem; 
ssl_certificate_key /etc/letsencrypt/live/$host/privkey.pem; 

to potentially make one entry that fits multiple domains, but it is not
possible 
I think the variable $host is not parsed in this specific directive 

nginx: [emerg] BIO_new_file("/etc/letsencrypt/live/$host/fullchain.pem")
failed (SSL: error:02001002:system library:fopen:No such file or
directory:fopen('/etc/letsencrypt/live/$host/fullchain.pem','r')
error:2006D080:BIO routines:BIO_new_file:no such file) 

it would be great to be able to use it here. 
Thanks

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,292653,292653#msg-292653



More information about the nginx mailing list