Welcome! Log In Create A New Profile

Advanced

Re: SetEnvIf To fastcgi_param Conversion

September 07, 2012 06:31AM
Hi,

First you will need to compile the map module. Then, in the main configuration block you define the following:

http {

...

map $host $mage_run_code {
albany.mywebsite.com 'w2760';
alexandria.mywebsite.com 'w1472';
annarbor.mywebsite.com 'w2933';
}

map $host $mage_run_type {
albany.mywebsite.com 'website';
alexandria.mywebsite.com 'website';
annarbor.mywebsite.com 'website';
}

fastcgi_param MAGE_RUN_CODE $mage_run_code;
fastcgi_param MAGE_RUN_TYPE $mage_run_type;


...

}


Alternatively, if you have all three servers defined as virtual hosts via server configuration, then you can simply add:

fastcgi_param MAGE_RUN_CODE '...';
fastcgi_param MAGE_RUN_TYPE '...';

to your fastcgi handler block and then you don't need the map module. Of course, you should substitute "..." with appropriate values per virtual host.

Good luck!

Andrejs
Subject Author Posted

SetEnvIf To fastcgi_param Conversion

iqbalmp September 07, 2012 01:52AM

Re: SetEnvIf To fastcgi_param Conversion

locojohn September 07, 2012 06:31AM

Re: SetEnvIf To fastcgi_param Conversion

iqbalmp September 07, 2012 06:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 106
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 466 on July 09, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready