Last active
December 17, 2015 14:09
-
-
Save deivisonarthur/5622630 to your computer and use it in GitHub Desktop.
Redirect multilojas Magento com Nginx Adicionar no index.php do magento assim /* Store or website code */
$mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';
/* Run store or run website */
$mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store'; Mage::run($mageRunCode, $mageRunType);
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map $http_host $magesite { | |
ShopEmMagento.com default; #Se a url for www.ShopEmMagento.com joga para default | |
ShopEmMagento2.com store2; #Se a url for www.ShopEmMagento2.com joga para store2 | |
} | |
server { | |
fastcgi_param MAGE_RUN_TYPE store; | |
fastcgi_param MAGE_RUN_CODE $magesite; #Aqui repassa para o Magento a loja | |
include fastcgi_params; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment