I run nginx. In a "server" section for one of websites I have this:
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
set $app_name myapp;
set $app_port 4000;
ssl_certificate /etc/letsencrypt/live/$app_name.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/$app_name.com/privkey.pem;
access_log /var/log/nginx/$app_name.com.access.log;
error_log /var/log/nginx/$app_name.com.error.log;
#.............
At least one of the custom variables won't get resolved - app_name; for instance, it'll create a file /var/log/nginx/$app_name.com.access.log
namely, with $app_name in it.
Consequently, in all other places of the config file where it's used, it won't get resolved either.
In the "error.log" I see that value of the variable is empty.
Why not? How to fix it?