Variables in ssl_certificate

Hi there,

So that I can run identical configurations on many servers, I would like
to
abstract my nginx configuration down by doing this in my SSL “server”
stanza:

ssl_certificate             /etc/ssl/${server_name}.pem;

However, nginx won’t interpret this variable, causing this error:
Restarting nginx: [emerg]:
SSL_CTX_use_certificate_chain_file(“/etc/ssl/${server_name}.pem”) failed

Is it possible to use variables in ssl_certificate in this way? Ideally
I’d
even like to use a “map” but this doesn’t get interpreted either. :frowning:

TIA,
Matt.

Matt Saunders 07506 857125
http://www.yoyo.org/matts/contacts/

I think the best way is write a config generator by yourself with
velocity or freemarker

Posted at Nginx Forum: