Welcome to WebmasterWorld Guest from

Forum Moderators: brotherhood of lan & mack

Message Too Old, No Replies

How do I set up my Mac OS X (Tiger) to build two websites using joomla

8:46 pm on May 13, 2009 (gmt 0)

New User

5+ Year Member

joined:May 13, 2009
votes: 0

I am using a Macbook (not that it should make a difference)

I have installed MAMP - working
I have installed Joomla and can see my first website.

I want to develop two websites, one for our own small business and another for an environmental issue I am collecting information for.

Anyway - until I am at the hosting stage, I want to develop these websites 'off line' ie local host on my own computer.

I have read something about two folders in the 'htdocs' folder in the MAMP folder and something about telling Apache how to differentiate between the two folders but do not really understand how to make it work.

Anyone who replies - help very much appreciated but please make it simple as I do not really understand the whole Apache/ MySQL thing very well.

3:54 am on May 14, 2009 (gmt 0)

Moderator This Forum from GB 

WebmasterWorld Administrator brotherhood_of_lan is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 30, 2002
votes: 1

Welcome to the forums Andrew_R,

I'm not a Mac user... I'm sure someone else can chip in or we can split the question and ask in the Mac forum.

The first step is to have 2 domain names point internally to your local server, I typically use the live domain and replace the dots with underscores, i.e. www_webmasterworld_com so you can see your 'live' and 'local' versions easily.

On windows, the 'hosts' file to edit is
On linux type systems (I assume for all) it is
A quick Google suggests that the Mac one is located here (note that it may not be located here)

You would want to add something like site1_com site2_com

In regards to Apache, you would edit your http.conf /apache2.conf file to add something like this

<VirtualHost *:80>
ServerName site1_com
ServerAlias www_site1_com
DocumentRoot /var/www/site1_com
ErrorLog /var/www/logs/site1_com

<VirtualHost *:80>
ServerName site2_com
ServerAlias www_site2_com
DocumentRoot /var/www/site2_com
ErrorLog /var/www/logs/site2_com

"/var/www/" would be the root folder for all your websites. The abovecode tells apache where to find site1_com or site2_com on your Mac

Make up backup copy of your hosts file and the apache config file and give it a bash... if it doesn't work like my example, the solution will be similar to it.