How can I pass environment variable in nginx conf?

2

I have nginx conf as

location /static/ {
                alias $HOME/code/python/vlists/vlists/static/;
        # if asset versioning is used
        if ($query_string) {
            expires max;
        }
    }

where in I want to pass my $HOME from environment, so I do this

$ sudo -E nginx
nginx: [emerg] unknown "home" variable

How do I make sure that $HOME replaces correctly in nginx.conf?

daydreamer

Posted 2012-09-23T18:45:24.260

Reputation: 805

Nginx supports several variables given here http://wiki.nginx.org/HttpCoreModule#Variables , $home is probably not supported

– HackToHell – 2012-09-24T01:46:16.357

No answers