This file contains 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
server { | |
listen 8080; | |
server_name local.something.com; | |
set $MAGE_ROOT /usr/share/nginx/html/something; | |
set $MAGE_RUN_TYPE website; | |
include /usr/share/nginx/html/something/nginx.conf.sample; | |
} |
This file contains 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
server { | |
listen 8080; | |
server_name local.something.com; | |
set $MAGE_ROOT /usr/share/nginx/html/something; | |
set $MAGE_RUN_TYPE website; | |
include /usr/share/nginx/html/something/nginx.conf.sample; | |
} |
This file contains 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
server { | |
listen 443 ssl http2; | |
server_name admin.local.xx.com; | |
ssl on; | |
ssl_certificate /etc/nginx/ssl/cert.pem; | |
ssl_certificate_key /etc/nginx/ssl/key.pem; | |
ssl_session_timeout 24h; | |
keepalive_timeout 600s; |
This file contains 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 $MAGE_RUN_CODE { | |
admin.local.x.com admin; | |
local.a.com websiteA; | |
local.b.ca websiteB; | |
default admin; | |
} |
This file contains 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
Two steps: | |
1. Setup Multistore at the admin where each store url are the same | |
2. Create pub/{{store_code}}/index.php | |
<?php | |
require realpath(__DIR__) . '/../../app/bootstrap.php'; | |
$params = $_SERVER; | |
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_CODE] = '{{store_code}}'; | |
$params[\Magento\Store\Model\StoreManager::PARAM_RUN_TYPE] = 'website'; |
This file contains 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
# | |
# X-Sendfile | |
# | |
LoadModule xsendfile_module modules/mod_xsendfile.so | |
XSendFile On | |
XSendFilePath "/var/www/site/" |
This file contains 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
<?php | |
/** | |
* @author Sashas IT Support <[email protected]> | |
* @copyright 2017 Sashas IT Support Inc. (http://www.extensions.sashas.org) | |
* @license http://opensource.org/licenses/GPL-3.0 GNU General Public License, version 3 (GPL-3.0) | |
*/ | |
\Magento\Framework\Component\ComponentRegistrar::register( | |
\Magento\Framework\Component\ComponentRegistrar::MODULE, | |
'Sashas_CustomerAttribute', |
This file contains 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
<?php | |
/** | |
* @author Sashas IT Support <[email protected]> | |
* @copyright 2017 Sashas IT Support Inc. (http://www.extensions.sashas.org) | |
* @license http://opensource.org/licenses/GPL-3.0 GNU General Public License, version 3 (GPL-3.0) | |
*/ | |
namespace Sashas\CustomerAttribute\Setup; |
This file contains 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
<?xml version="1.0"?> | |
<!-- | |
~ @author Sashas IT Support <[email protected]> | |
~ @copyright 2017 Sashas IT Support Inc. (http://www.extensions.sashas.org) | |
~ @license http://opensource.org/licenses/GPL-3.0 GNU General Public License, version 3 (GPL-3.0) | |
--> | |
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd"> | |
<module name="Sashas_CustomerAttribute" setup_version="2.0.0"> | |
<sequence> | |
<module name="Customer"/> |
This file contains 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
SET FOREIGN_KEY_CHECKS=0; | |
UPDATE store SET store_id = 0 WHERE code='admin'; | |
UPDATE store_group SET group_id = 0 WHERE name='Default'; | |
UPDATE store_website SET website_id = 0 WHERE code='admin'; | |
UPDATE customer_group SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN'; | |
SET FOREIGN_KEY_CHECKS=1; |
NewerOlder