Welcome to WebmasterWorld Guest from 54.224.57.95

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)

5+ Year Member



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)

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



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
/windows/system32/drivers/etc/hosts
On linux type systems (I assume for all) it is
/etc/hosts
A quick Google suggests that the Mac one is located here (note that it may not be located here)
/private/etc/hosts

You would want to add something like


127.0.0.1 site1_com
127.0.0.1 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>


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

"/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.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month