I capture the server name like this:
server_name ~^(?<account>.+)\.myapp\.io$;
an later i try to use it on the same file, like:
include $account.conf;
but it returns:
nginx: [emerg] open() "/etc/nginx/$account.conf" failed (2: No such file or directory)
of course, the file exists.
If i use it somewhere else, it works, like:
access_log /var/log/nginx/$account-access.log;
0 Answers