Friday, August 13, 2010

Configure Multiple Magento 1.4.x Websites on same server

It took a while to do this, as I know too little about Magento or Apache, but here is what I did:

- Create websites in Magento Admin (remember the codenames as they will be used later);
- Create Stores and Store Views to each website (you will need them for the final test);
- Configure {{Base_Url}} for each website ([will complement with images])
- Create hosts to your servers' IP address on your DNS Server (ex.: sample1.com, sample2.com);
- Access httpd.conf to create a VirtualHost for each Website (ex.:
#IP:PORT as in 'NameVirtualHost'
DocumentRoot "c:\wamp\www" #Location to www or alias folder
ServerName sample1.com #Server's Domain Name for the WebSite
SetEnv MAGE_RUN_CODE "base" #Website/store codename
SetEnv MAGE_RUN_TYPE "website" #website/store

);

Now you should be able to access each frontend on each address.

No comments:

Post a Comment