My goal is two have two versions of Magento installed in my Sites/ folder. One is the current version we are using (1.12), and the other is the upgraded version (1.14). There are several reasons why I need to do this.
Another developer upgraded Magento and sent over the site files, which I put in Sites/magento2.dev, and I also have the working original in Sites/magento1.dev.
I created a separate database, imported the dump from the upgraded version, and put this in the local.xml file for magento2:
<host><![CDATA[localhost]]></host>
<username><![CDATA[root]]></username>
<password><![CDATA[mypassword]]></password>
<dbname><![CDATA[mydatabase]]></dbname>
<active>1</active>
Then I went into the database and changed the core_config_data
base urls for our three websites to mimic what I had set on the older version:
http://www.magento2.dev/
http://www.magento2-b.dev/
http://www.magento2-c.dev/
I updated my /etc/apache2/extra/httpd-vhosts.conf file:
# Virtual Hosts
# Note: You also need to edit the hosts file /private/etc/hosts
NameVirtualHost *:80
#magento1.dev / Magento 1.12
<VirtualHost *:80>
ServerAdmin myuser@mywebsite.com
DocumentRoot "/Users/myuser/Sites/magento1.dev"
<Directory "/Users/myuser/Sites/magento1.dev">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ServerName magento1.dev
ErrorLog "/private/var/log/apache2/magento1.dev-error_log"
CustomLog "/private/var/log/apache2/magento1.dev-access_log" common
</VirtualHost>
#magento-b.dev / Magento 1.12
<VirtualHost *:80>
ServerAdmin myuser@mywebsite.com
DocumentRoot "/Users/myuser/Sites/magento1.dev"
ServerName magento1-b.dev
ErrorLog "/private/var/log/apache2/magento1-b.dev-error_log"
CustomLog "/private/var/log/apache2/magento1-b.dev-access_log" common
</VirtualHost>
#magento-c.dev / Magento 1.12
<VirtualHost *:80>
ServerAdmin myuser@mywebsite.com
DocumentRoot "/Users/myuser/Sites/magento1.dev"
ServerName magento1-c.dev
ErrorLog "/private/var/log/apache2/magento1-c.dev-error_log"
CustomLog "/private/var/log/apache2/magento1-c.dev-access_log" common
</VirtualHost>
#magento2.dev / Magento 1.14
<VirtualHost *:80>
ServerAdmin myuser@mywebsite.com
DocumentRoot "/Users/myuser/Sites/magento2.dev"
ServerName magento2.dev
ErrorLog "/private/var/log/apache2/magento2.dev-error_log"
CustomLog "/private/var/log/apache2/magento2.dev-access_log" common
</VirtualHost>
#magento2-b.dev / Magento 1.14
<VirtualHost *:80>
ServerAdmin myuser@mywebsite.com
DocumentRoot "/Users/myuser/Sites/magento2.dev"
ServerName magento2-b.dev
ErrorLog "/private/var/log/apache2/magento2-b.dev-error_log"
CustomLog "/private/var/log/apache2/magento2-b.dev-access_log" common
</VirtualHost>
#magento2-c.dev / Magento 1.14
<VirtualHost *:80>
ServerAdmin myuser@mywebsite.com
DocumentRoot "/Users/myuser/Sites/magento2.dev"
ServerName magento2-c.dev
ErrorLog "/private/var/log/apache2/magento2-c.dev-error_log"
CustomLog "/private/var/log/apache2/magento2-c.dev-access_log" common
</VirtualHost>
I updated my /private/etc/hosts file:
127.0.0.1 localhost
127.0.0.1 www.magento1.dev
127.0.0.1 www.magento1-b.dev
127.0.0.1 www.magento1-c.dev
127.0.0.1 www.magento2.dev
127.0.0.1 www.magento2-b.dev
127.0.0.1 www.magento2-c.dev
I have tried a few other iterations of this (adding trailing slashes, http, www, etc), always with the same result. When I go to www.magento2.dev, www.magento2-b.dev, or www.magento2-c.dev, I get a slightly different version (fonts broken) of my old version of the site (www.magento1.dev), but with the new URL. Logging into the backend, I can see that it is 1.12, and the URL changes to the older version. Basically it seems like I just made three new local domains for the old version of the primary store website.
I've restarted apache and mysql about a million times.
I should also note that if I got to http://localhost/~myuser/magento2.dev
, I get a 403 notice.
What am I missing here?