setting environment variable

Igor Sysoev is at rambler-co.ru
Tue Sep 15 14:07:15 MSD 2009


On Tue, Sep 15, 2009 at 02:54:44PM +0500, Ziyad Saeed wrote:

> How do I set an environment variable based on the domainFor ex if the domain
> is http://dev.flow3.local then FLOW3_CONTEXT = Development. Otherwise its
> Production
> 
> Nginx 0.8.15

Variable $domain:

http {

    map $http_host  $domain {
        default           Production;
        dev.flow3.local   Development;
    }


-- 
Igor Sysoev
http://sysoev.ru/en/





More information about the nginx mailing list