#2533 closed defect (duplicate)

Variables does not work in error_log and ssl_certificate

Reported by: EduardoRuizM@… Owned by:
Priority: minor Milestone:
Component: documentation Version: 1.25.x
Keywords: Cc:
uname -a: Linux sagan.dataclick.es 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.25.2
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC)
built with OpenSSL 3.1.2 1 Aug 2023
TLS SNI support enabled
configure arguments: --prefix=/olimpo/bin/nginx --user=nginx --group=nginx --with-http_stub_status_module --with-http_ssl_module --with-http_v2_module --with-http_v3_module --with-http_mp4_module --with-http_image_filter_module --with-openssl=../openssl-3.1.2 --without-http_autoindex_module

Description

Variables does not work in directives.
Sample:

set $DOMAIN "mydomain.tld";

access_log /mypath/$DOMAIN/logs/access.log; # Works
error_log /mypath/$DOMAIN/logs/error.log; # ERROR
ssl_certificate /mycerts/$DOMAIN/fullchain.cer; # ERROR
ssl_certificate_key /mycerts/$DOMAIN/$DOMAIN.key; # ERROR

Change History (1)

comment:1 by Maxim Dounin, 16 months ago

Resolution: duplicate
Status: newclosed

Duplicate of #2531.

Note: See TracTickets for help on using tickets.