I have 'website1.com' running OpenCart 2.0.1.1 and I want to set up a multi store with 'website2.com' - so that the client can manage both websites via one single admin area instance. To my understanding, I'm supposed to point 'website2.com' to use the same httpdocs location as 'website1.com'. Instead, I've set up 'website2.com' as an alias of 'website1.com' which is fine, the website loads up but what is confusing me is the config.php:
<?php
// HTTP
define('HTTP_SERVER', 'http://ift.tt/1HD4Auf');
// HTTPS
define('HTTPS_SERVER', 'http://ift.tt/1PAgFDf');
// DIR
define('DIR_APPLICATION', '/var/www/vhosts/website1.com/httpdocs/catalog/');
define('DIR_SYSTEM', '/var/www/vhosts/website1.com/httpdocs/system/');
define('DIR_LANGUAGE', '/var/www/vhosts/website1.com/httpdocs/catalog/language/');
define('DIR_TEMPLATE', '/var/www/vhosts/website1.com/httpdocs/catalog/view/theme/');
define('DIR_CONFIG', '/var/www/vhosts/website1.com/httpdocs/system/config/');
define('DIR_IMAGE', '/var/www/vhosts/website1.com/httpdocs/image/');
define('DIR_CACHE', '/var/www/vhosts/website1.com/httpdocs/system/cache/');
define('DIR_DOWNLOAD', '/var/www/vhosts/website1.com/httpdocs/system/download/');
define('DIR_UPLOAD', '/var/www/vhosts/website1.com/httpdocs/system/upload/');
define('DIR_MODIFICATION', '/var/www/vhosts/website1.com/httpdocs/system/modification/');
define('DIR_LOGS', '/var/www/vhosts/website1.com/httpdocs/system/logs/');
Would there be any security issues if I were to change every instance of 'website1.com' to $_SERVER['HTTP_HOST']? - this way, the correct directories would be loaded into the config file.
Apparently the correct way to set up multi-store is to set the domain up as a VirtualHost - but I can't understand how this would work since the define statements are still always going to point to the first website.
Appreciate any help!
Thanks,
Liam
Aucun commentaire:
Enregistrer un commentaire