Hugh's picture

OK hopefully this is a simple query and one I hopefully (half-)know the answer to.

I'd like to make my two web servers (Magento and Joomla) show their respective content seamlessly whether the user types www.<domain> or just <domain> into their web browser.

I think what I need to do is:

1. adjust DNS settings so <domain> points to the correct IP (CNAME?)

2. create a vhost for <domain> on each web server.

Is that right?  Is there anything else? 

Grateful for any advice.

Forum: 
Hugh's picture

As a supplementary issue: I currently have two web server as mentioned.  Could I possibly host both the Magento and the Joomla on the one server (thus saving on EC2 fees?)  I'm guessing this would be similar to above with DNS and VHOST settings?  Would this make things over-complicated and/or over-stress the server?

Regards

Hugh

Jeremy Davis's picture

In response to your first post:
You will only need a CNAME DNS record. No need for vhost for each domain etc; it should all just work... However IIRC Magento needs to know the domain it is hosted on; so you should do a redirect from the secondary one to the primary one

In response to your second post:
Yes totally doable; although TurnKey is not super helpful in that case...
You will need to transfer the webroot (aka site directory - i.e. /var/www/<app-name>) from one to the other) and the DB too... When you do this you will now need to have separate vhosts files (as suggested in your first post).

Keep in mind though that TKLBAM (TurnKey's built in custom backup) may not work as you might expect once you do that (it might but I'm not 100% sure without checking it). If you are using it for backups then I would double check that it is working as you desire. If you need help with that I can help! :)

PS if you're not using TKLBAM that's fine but make sure that you are using some sort of backup!

Hugh's picture

Appreciate your help.  Just one question - how do I do the redirect from <domain> to www.<domain> so Magento knows what it's doing?

Thanks again.

Hugh's picture

I managed to get <domain> to show the same site as www.<domain> by doing exactly as you described.  Thanks a lot, Jeremy.

Jeremy Davis's picture

Glad to hear you got it working!

Add new comment