erro -> nginx: [emerg] BIO_new_file("/etc/letsencrypt/live/$sslwww/fullchain.pem")
the configuration with map or with if are not working what I can do for them to work?
do not just find the path to the file
map $http_host $sslwww {
default "test.com";
~^(?<subdomain>([\w-]+\.)*)?(?<domain>.+)$ $domain;
}
server {
listen 80;
listen [::]:80;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name ~^(?<subdomain>([\w-]+\.)*)?(?<domain>.+)$;
#set $sslwww "test.com"; -> not work
#if ($domain != "test.com"){
#set $sslwww $domain;
#}
ssl_certificate "/etc/letsencrypt/live/$sslwww/fullchain.pem";
}
Where am I going wrong?
in use include conf but I think it would not be good. what another solution to load 1k ssl cert