Nginx – How to add a Map Variable to a String


I have below configuration in my nginx.conf, however, for some reason, it doesn’t recognise the $site_name as a variable

map $host $site_name {
  default example.com;
}
error_log  /var/www/vhosts/{$site_name}/httpdocs/var/logs/nginx/error.log error;

The error I get is

nginx: (emerg) open() "/var/www/"$site_name"/httpdocs/var/logs/nginx/error.log" failed (2: No such...irectory)