Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

roadart

macrumors newbie
Original poster
Nov 27, 2006
4
0
Miami
Hi everyone,

I'm a recent "switcher" (i.e., I've seen the light and changed from PC to Mac). I've recently purchased a 15" MBP (Intel version) and need to know how to set it up to run Apache, PHP 5 and MySQL. I would like have a copy of my live site on my laptop so that I can make development changes to it and then FTP it to my web server. The script I'm running requires that I have a "virtual host" so that my URL is the same as the live one.

I've tried to search the forums and Google but what I've found is bits and pieces. Headdress is not ready to do what I need apparently. I realize Apache is built into the Mac OS but I don't know how to "turn it on". Then, how do I load MySQL on it? Etc, etc.

Is there a simple package that I can download that will set up Apache, PHP 5 and MySQL (with PHPMyAdmin, hopefully) and then set up a single site virtual hosting environment?

Thanks in advance for your help.

Art
 
http://www.mamp.info/en/home/

Apache Version: 2.0.55
MySQL Version: 5.0.19
PHP Version: 4.4.2 & 5.1.4
eAccelerator: 0.9.5b2
Zend Optimizer: 2.6.0
phpMyAdmin 2.7.0-pl2
SQLite Version: 2.8.16
SQLiteManager Version: 1.1.3
Freetype Version: 2.1.9
t1lib Version: 5.1.0
curl Version: 7.14.0
jpeg Version: 6b
libpng Version: 1.2.5
gd Version: 2.0.28
 
Thanks Benjamin. I've been on their forums and people are saying that it is harder to set up a virutal host using MAMP than it is with Mac OS X. Is it possible to set up a virtual host using the MAC OS? Thanks.
 
Thanks Benjamin. I've been on their forums and people are saying that it is harder to set up a virutal host using MAMP than it is with Mac OS X. Is it possible to set up a virtual host using the MAC OS? Thanks.

I've never used the MAMP package, but isn't it just Mac Apache MySQL PHP?

Virtual hosts are set up in the Apache config file(s), regardless of which version of Apache you are using or where it came from.

The Mac OS X Apache config file is /private/etc/httpd/httpd.conf

Back it up and edit it with Vim (or whatever). Virtual hosts look like this:

Code:
<VirtualHost some.ip.address:80>
        ServerAdmin webmaster@domain.com
        DocumentRoot /path/to/document/root
        ServerName www.domain.com
        ServerAlias domain.com
        ErrorLog /path/to/log
       #other config stuff
</VirtualHost>
 
Another very similar project is xampp. I find myself recommending it again, although, to be honest, I haven't used the Mac version. What I can say is that on Windows, almost no setup and configuration was necessary. I know that this doesn't say much, but you might also want to try it.
 
Another very similar project is xampp. I find myself recommending it again, although, to be honest, I haven't used the Mac version. What I can say is that on Windows, almost no setup and configuration was necessary. I know that this doesn't say much, but you might also want to try it.

XAMPP isn't updated nearly as frequently as MAMP on the Mac side. Although neither are updated enough for my tastes.

Edit: Wow, xampp was just updated, maybe I'll switch again....
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.