Welcome! Log In Create A New Profile

Advanced

Re: Equivalent of Apache's SetEnv Variable

Raina Gustafson
August 03, 2010 05:08PM
I've tried several variations, but haven't been able to get this
working. The virtual hosts are set up fine, and both domains will load
a home page, but Magento doesn't seem to be picking up on the
MAGE_RUN_CODE or MAGE_RUN_TYPE variables being set. From the secondary
home page, all links (category/product pages) point to those pages on
the main domain. I'm confident everything within the Magento database
configuration is set up correctly.

Here's what I've got:
Primary domain: http://dev.swimkitten.com/
Secondary domain: http://dev.swimkitten.co.uk/

/etc/nginx/nginx.conf - http://pastie.org/1073715
/etc/nginx/conf.d/dev.swimkitten.com.conf - http://pastie.org/1073720
/etc/nginx/conf.d/dev.swimkitten.co.uk.conf - http://pastie.org/1073722
/etc/fastcgi_params - http://pastie.org/1073725

Any further thoughts? I've tried putting the variables in:
location /
and
location ~ \.php$

I haven't yet tried making 2 separate fastcgi_params files and
pointing to the respective ones from within each domain.conf file.

Thanks for any further help with this!


On Thu, Jul 29, 2010 at 12:21 PM, Igor Sysoev <igor@sysoev.ru> wrote:
> 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/
>
> _______________________________________________
> nginx mailing list
> nginx@nginx.org
> http://nginx.org/mailman/listinfo/nginx
>

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Equivalent of Apache's SetEnv Variable

Raina Gustafson July 29, 2010 12:28PM

Re: Equivalent of Apache's SetEnv Variable

Eugaia July 29, 2010 01:24PM

Re: Equivalent of Apache's SetEnv Variable

Igor Sysoev July 29, 2010 01:32PM

Re: Equivalent of Apache's SetEnv Variable

Raina Gustafson July 29, 2010 01:34PM

Re: Equivalent of Apache's SetEnv Variable

Raina Gustafson August 03, 2010 05:08PM

Re: Equivalent of Apache's SetEnv Variable

mike August 03, 2010 05:24PM

Re: Equivalent of Apache's SetEnv Variable

Raina Gustafson August 03, 2010 07:20PM

Re: Equivalent of Apache's SetEnv Variable

mike August 03, 2010 07:38PM

Re: Equivalent of Apache's SetEnv Variable

Raina Gustafson August 03, 2010 07:52PM

Re: Equivalent of Apache's SetEnv Variable

mike August 03, 2010 08:26PM

Re: Equivalent of Apache's SetEnv Variable

Ed W August 04, 2010 05:50PM

Re: Equivalent of Apache's SetEnv Variable

mike August 04, 2010 05:52PM

Re: Equivalent of Apache's SetEnv Variable

Igor Sysoev August 05, 2010 02:48AM

Re: Equivalent of Apache's SetEnv Variable

mike August 05, 2010 03:10AM

Re: Equivalent of Apache's SetEnv Variable

Igor Sysoev August 05, 2010 03:32AM

Re: Equivalent of Apache's SetEnv Variable

Grzegorz Nosek August 05, 2010 03:20AM

Re: Equivalent of Apache's SetEnv Variable

Igor Sysoev August 05, 2010 03:38AM

Re: Equivalent of Apache's SetEnv Variable

Grzegorz Nosek August 05, 2010 04:12AM

Re: Equivalent of Apache's SetEnv Variable

Igor Sysoev August 05, 2010 04:12AM

Re: Equivalent of Apache's SetEnv Variable

Grzegorz Nosek August 05, 2010 04:18AM

Re: Equivalent of Apache's SetEnv Variable

Igor Sysoev August 05, 2010 04:26AM

Re: Equivalent of Apache's SetEnv Variable

Grzegorz Nosek August 05, 2010 04:54AM

Re: Equivalent of Apache's SetEnv Variable

mike August 05, 2010 05:18AM

Re: Equivalent of Apache's SetEnv Variable

Igor Sysoev August 05, 2010 06:02AM

Re: Equivalent of Apache's SetEnv Variable

Grzegorz Nosek August 05, 2010 06:22AM

Re: Equivalent of Apache's SetEnv Variable

mike August 05, 2010 06:26AM

Re: Equivalent of Apache's SetEnv Variable

Grzegorz Nosek August 05, 2010 06:46AM

Re: Equivalent of Apache's SetEnv Variable

mike August 05, 2010 06:52AM

Re: Equivalent of Apache's SetEnv Variable

Grzegorz Nosek August 05, 2010 07:04AM

Re: Equivalent of Apache's SetEnv Variable

Igor Sysoev August 05, 2010 07:16AM

Re: Equivalent of Apache's SetEnv Variable

Igor Sysoev August 05, 2010 07:18AM

Re: Equivalent of Apache's SetEnv Variable

Igor Sysoev August 05, 2010 06:50AM

Re: Equivalent of Apache's SetEnv Variable

Grzegorz Nosek August 05, 2010 06:52AM

Re: Equivalent of Apache's SetEnv Variable

mike August 05, 2010 03:42AM

Re: Equivalent of Apache's SetEnv Variable

Grzegorz Nosek August 05, 2010 04:14AM

Re: Equivalent of Apache's SetEnv Variable

mike August 05, 2010 04:18AM

Re: Equivalent of Apache's SetEnv Variable

Cliff Wells August 04, 2010 10:48PM

Re: Equivalent of Apache's SetEnv Variable

Ed W August 26, 2010 07:12AM

Re: Equivalent of Apache's SetEnv Variable

mike August 26, 2010 07:22AM

Re: Equivalent of Apache's SetEnv Variable

Jim Ohlstein August 26, 2010 10:28PM

Re: Equivalent of Apache's SetEnv Variable

Ed W August 27, 2010 11:00AM

Re: Equivalent of Apache's SetEnv Variable

mike August 04, 2010 06:20AM

Re: Equivalent of Apache's SetEnv Variable

Raina Gustafson August 04, 2010 10:58AM

Re: Equivalent of Apache's SetEnv Variable

mike August 04, 2010 04:04PM

Re: Equivalent of Apache's SetEnv Variable

Raina Gustafson August 04, 2010 11:14AM

Re: Equivalent of Apache's SetEnv Variable

mike August 04, 2010 04:00PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 164
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready