Equivalent of Apache's SetEnv Variable

Igor Sysoev igor at sysoev.ru
Thu Jul 29 21:21:15 MSD 2010


On Thu, Jul 29, 2010 at 11:18:07AM -0500, Raina Gustafson wrote:

> Issue:
> I'd like to configure Magento to run in multi-domain mode.
> I've been successful doing this via Apache in the past.
> It seems that Nginx should be equally capable, but I haven't succeeded.
> 
> Server Specs:
> Nginx (latest)
> PHP 5.3.3
> PHP-FPM enabled
> Magento (latest)
> 
> What I Know:
> Apache relies on the SetEnv variable in the virtual host definition or
> a similar instruction in an .htaccess file to achieve this
> functionality. The specifics are here:
> http://www.magentocommerce.com/wiki/multi-store_set_up/multiple-website-setup.
> 
> What I Don't Know:
> Does Nginx have an equivalent to SetEnv?
> Can Nginx be configured to imitate this configuration through rewrites
> or some other method?

Probably, you need

     server {

         location / {
             fastcgi_pass   ...
             fastcgi_param  MAGE_RUN_CODE  base;
             fastcgi_param  MAGE_RUN_TYPE  website;
             ...
         }
     }


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



More information about the nginx mailing list