Magento EE v1.14.x, CentOS 7
We already have a website/store/view shop which works fine, listening on 'shop.mydomain.co.uk'.
We just tried adding a new website/store/view by:
- Registering 'shop2.mydomain.co.uk' with DNS.
Configuring Apache to serve virtualhost 'shop2.mydomain.co.uk':
<VirtualHost *:80> DocumentRoot /ssddata/www/shop.mydomain.co.uk ServerName shop2.mydomain.co.uk ErrorLog logs/shop2.mydomain.co.uk/error_log CustomLog logs/shop2.mydomain.co.uk/access_log common <Directory "/ssddata/www/shop.mydomain.co.uk"> Require ip 10.11.0.0/16 Options Indexes FollowSymLinks MultiViews AllowOverride All Require all granted Order allow,deny Allow from all </Directory> SetEnv MAGE_RUN_CODE "shop2_site_code" SetEnv MAGE_RUN_TYPE "website" </VirtualHost>
Creating the appropriate new website/store/view in Magento Admin.
- Configuring Magento web management for the new site to use a new custom CMS homepage, new custom 'CMS No Route Page' and set the Base URL to use "http://shop2.mydomain.co.uk/".
Everything seems fine, and we have read at least a dozen online guides, however, when we browse to our new site ('shop2.mydomain.co.uk'), the browser responds with
shop2.mydomain.co.uk redirected you too many times.
I know there are many many similar questions everywhere on this issue, but none fit our circumstances (and none of their solutions work for us). For instance, the rest of our Magento instance is fine. The Admin area is still online and our primary shop is still working fine.
What I have done/checked:
- [magento root]/.htaccess is fine.
- All file permissions are fine.
- I have tried cleaning out all browser cookies, browsing "incognito" and even new browsers.
- Cleared out [magento root]/var/cache.
- Cleared out [magento root]/var/session.
- Flushed all Magento caches.
- Checked Apache and Magento logs.
I have found that if I remove the two SetEnv commands from the Apache virtualhost then I can browse to the 'shop2.mydomain.co.uk' URL but Magento serves the primary site/shop. So, it must be something to do with Magento trying to run the specified website code (via MAGE_RUN_CODE) which causes a loop. But I don't understand why or how.
We are running out of ideas as to why this new site is endlessly redirecting.
Does anyone have any suggestions to get this new site working please?
UPDATE 1 Something I should add is that when the browser reports "redirected you too many times", the address bar changes to: "http://shop2.mydomain.co.uk/no-route". So Magento must be responding somehow, as it tries to redirect it to it's default "404 Page not found" page (URL-key: no-route). Interestingly though, the URL-key in our configuration for shop2.mydomain.co.uk's "404 page not found" page is actually "shop2-no-route", not "no-route". No idea if this is significant or helpful though! :)