Welcome! Log In Create A New Profile

Advanced

Using $host variable in ssl_certificate path

October 20, 2021 12:00PM
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
Subject Author Posted

Using $host variable in ssl_certificate path

dimitre October 20, 2021 12:00PM

Re: Using $host variable in ssl_certificate path

Sergey Kandaurov October 20, 2021 12:24PM

Re: Using $host variable in ssl_certificate path

dimitre October 20, 2021 12:43PM

Re: Using $host variable in ssl_certificate path

dimitre October 20, 2021 01:27PM

Re: Using $host variable in ssl_certificate path

Grzegorz Kulewski October 20, 2021 04:14PM

Re: Using $host variable in ssl_certificate path

dimitre October 20, 2021 07:40PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 72
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready