Set Up Second Store in Multi-Domain Configuration for Magento CE 1.7.0.2

ce-1.7.0.2configurationmultistore

I am trying to set up a second store based on a single magento installation. I have created the website, store, and store view as indicated in http://www.magentocommerce.com/knowledge-base/entry/tutorial-multi-site-multi-domain-setup

But when I visit my second store (using its own URL), I end up on the home page of my first store.

I have modified the .htaccess and httpd.conf, cleared the cache and restarted apache, as advised in the tutorial

Can you help me please ?

EDIT:

My changes to .htaccess:

SetEnvIf Host www\.broum-utilitaires\.com MAGE_RUN_CODE=broum_utilitaires
SetEnvIf Host www\.broum-utilitaires\.com MAGE_RUN_TYPE=website
SetEnvIf Host ^broum-utilitaires\.com MAGE_RUN_CODE=broum_utilitaires
SetEnvIf Host ^broum-utilitaires\.com MAGE_RUN_TYPE=website

SetEnvIf Host www\.broum-utilitaire\.fr MAGE_RUN_CODE=broum_vintage
SetEnvIf Host www\.broum-utilitaire\.fr MAGE_RUN_TYPE=website
SetEnvIf Host ^broum-utilitaire\.fr MAGE_RUN_CODE=broum_vintage
SetEnvIf Host ^broum-utilitaire\.fr MAGE_RUN_TYPE=website

My httpd.conf

<VirtualHost *:80>
    ServerAdmin contact@broum-utilitaires.com
    ServerName broum-utilitaires.com
    DocumentRoot /var/www/broum
</VirtualHost>

<VirtualHost *:80>
    ServerAdmin contact@broum-utilitaire.fr
    ServerName broum-utilitaire.fr
    DocumentRoot /var/www/broum
</VirtualHost>

Best Answer

I've found the cause of my problem. It came from a wrong configuration of the redirection from my domain name to the server (I shouldn't have used the domain's host redirection utility).

I've had to set up the domain name so that it's managed by my server's DNS. And very, very important, in the virtual host configuration, add

<Directory />
    Options FollowSymLinks
    AllowOverride All
</Directory>

That's needed so that the .htaccess file is used, enabling the RewriteCond instructions needed for magento's multi-domain configuration.

Thanks to everyone who has contributed to resolving my problem !

Related Topic