homepage Welcome to WebmasterWorld Guest from 54.163.84.199
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / WebmasterWorld / New To Web Development
Forum Library, Charter, Moderators: brotherhood of lan & mack

New To Web Development Forum

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




msg:3912938
 8:46 pm on May 13, 2009 (gmt 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.

 

brotherhood of LAN




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

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / New To Web Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved