Setting environment variable

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

On Tue, Sep 15, 2009 at 02:54:44PM +0500, Ziyad S. 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;
}

Variable directive not found

Let me clarify

If http://flow3.local/*
then FLOW3_CONTEXT = Production

If http://dev.flow3.local/*
then FLOW3_CONTEXT = Development

2009/9/15 Igor S. [email protected]

On Tue, Sep 15, 2009 at 05:37:04PM +0500, Ziyad S. wrote:

Variable directive not found

“Variable $domain:” is a text. The configuration is


http {

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

Btw I’m using nginx on windows with php 5.3

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs