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
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