I have been trying to setup multi site multi domain setup in Magento for more than a week now. And no success! I first tried to do it on localhost then I tried to do it on live server (shared hosting).
I followed this tutorial http://www.magentocommerce.com/knowledge-base/entry/tutorial-multi-site-multi-domain-setup but nothing happens.
Can someone answer to my basic question? Do I need two separate Magento installations to perform multi site multi domain setup or only one installation with two domains? I am confused. Please, help!
Regards!
You can run more than one Magento store on a single installation. The clue is in the
index.php, specifically:The
$mageRunCodedefines the code of the store, or website, (as defined in theManage Storesection of the Administration area) that we’re initialising. The$mageRunTypedefines whether we’re going to be initialising a store, or a website.As you can see, Magento first checks for appropriate values as environment variables. Using apache as an example, values for these variables will need to be set in the
VirtualHostsection of yourhttpd.conf, or similar. We set the environment variables using theSetEnvdirective:We can use the same
DocumentRootfor all of our domains as we’re allowing theVirtualHostto switch the values of$_SERVER['MAGE_RUN_{CODE,TYPE}']depending on the requested hostname.