Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Is it possible to reference a named variable in the ssl_certificate directive?

$
0
0
Hi,

I'm looking to create a single simple server block that can handle multiple domains. Creating a RegEx match in the server block is straightforward enough, however, I can't seem to reference the named variable in the `ssl_certificate` and `ssl_certificate_key` directives, which would be required to reference different certificates.

The server block is something like:

server {
listen 443 ssl;
server_name ~^meet.(?<domain>.+)\.(com|co\.uk)$;

ssl_certificate ssl/$domain/cert.pem;
ssl_certificate_key ssl/$domain/certkey.pem;
...

}

I can refer to the $domain variable later in location blocks, but not in the ssl directives.

Is there any way to achieve something like this?

Cheers

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>