How to host multiple websites with MAMP Pro and DynDNS
25th July, 2008, 9
About the author
Ben Vallack is a web developer and filmmaker.
Tags: php,
hosting,
lamp,
mamp,
dyndns
I've been trying to set up a system on my local machine that enables me to have multiple sites running as virtual hosts, each with it's own public URL so I can show clients etc before actually putting it on a remote server. The solution I soon realised would be MAMP Pro in conjunction with DynDNS.
However I couldn't quite work out how to set it up to work with multiple hosts. I got a domain in DynDNS pointing to my IP address but it would only show the default host set up in MAMP. I thought the wildcard subdomain on the DynDNS domain would correspond with the name of the host in MAMP. However, they all just showed the default host.
It turns out that you need to set up individual domain hosts in DynDNS and then use the full url of those in MAMP Pro as the name of the host (or just as an alias). For example, lets say you have two hosts in MAMP Pro, one called test and one called test1. In DynDNS you need to set up two hosts, you can call them whatever you like but lets say you choose test.dyndns.info (the second part can be one of several choices if you have a free account) and test1.dyndns.info. You will then need to add an alias to your hosts in MAMP Pro and call them test.dyndns.info and test2.dyndns.info for your respective hosts.
That's it - simple once you know but I couldn't find this piece of info anywhere!


axelator
7th April, 2009
Nigel
30th July, 2009
How exactly does one add an alias to your host in MAMP. I dont have Pro.
Regards,
Nige
Andy White
31st August, 2009
Scott
28th October, 2009
Shane Robinson
9th December, 2009
BFTQ
9th January, 2010
Steve
1st March, 2010
Eric Bolikowski
29th April, 2010
Mike Howell
8th May, 2010
Works a treat. It is a little long but it allows a bit more flexability without having to have dyndns clients going on each pc. I can just port forward stuff and the alias trick works fine for web hosting my client's sites during development.