﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
663	Variable interpolation inside Map directive	Ronaldo Pontes		"http://stackoverflow.com/questions/26976535/variable-interpolation-inside-map-directive

I am trying to map a variable inside the http directive in Nginx.

When left alone, the variable alone gets expanded, if I add anything else to the string the expansion stops working.

http {

    map $host $foo {
        #default ""$host"";                    # - this works fine and returns 'localhost' 
        default ""This is my host: $host"";    # - THIS DOESN'T WORK
    }

    server {

        location / {
            echo $foo;
        }

    }

}"	enhancement	closed	minor		nginx-module	1.7.x	fixed	map, interpolation		Linux localhost.localdomain 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux	"nginx version: nginx/1.7.7
built by gcc 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC)
TLS SNI support enabled
configure arguments: --prefix=/usr/local/nginx/nginx-1.7.7 --conf-path=/etc/nginx/nginx.conf --sbin-path=/usr/local/nginx/nginx-1.7.7/sbin/nginx --with-http_ssl_module --with-http_gzip_static_module --with-http_perl_module --add-module=/tmp/nginx_naxsi --add-module=/tmp/nginx_auth_request --add-module=/tmp/nginx_headers_more --with-http_stub_status_module --add-module=/tmp/nginx_echo --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module"
