View previous topic :: View next topic |
Author |
Message |
Emerson1
Joined: 03 Mar 2013 Posts: 10
|
Posted: Sun Mar 03, 2013 5:44 am Post subject: Setting up MAMP 2 on OSX – Leopard & Snow Leopard |
|
|
Here is a quick guide for setting up MAMP (Mac, Apache, MySQL and PHP) on OSX. I used this on Leopard and have just set it up again on Snow Leopard.
This has been updated (20 July 2011) to include MAMP 2.0 in readiness for Lion.
First up, download a copy of MAMP from here: MAMP website. They offer a free version and a PRO version, which has a better GUI and lets you run multiple Virtual Hosts amongst other things. I will explain how to set this up on the free version later.
Once you have your download, go to System Preferences and switch off Web Sharing. (Sharing pane.)
Double-click the MAMP installer and drag the icon to the Apps folder to install it. It offers a free trial of MAMP PRO but go with the basic version.
You need to enable the root user for phpMyAdmin, so go to System > Library > Core Services > Directory Utility. Next go to theEdit menu > Enable Root User and enter a password .
Next, change the default MAMP settings by starting MAMP, opening the control panel and click the Preferences button. Go to the Ports tab and change the entries to 80 and 3306 as shown here:
I like to change the MAMP settings so files are served up from my Sites folder rather than the default MAMP htdocs folder. To do this, go to Applications > MAMP > conf > apache and open the http.conf file in a text editor. Go to line 368 (in MAMP 2.0 this is line 187) and comment it out, then add a new line like this: DocumentRoot “/Users/yourname/Sites”. I comment it out to keep the original reference handy! Do the same thing at line 394 (MAMP 2.0 line 212) adding the same path as before:
.
Restart MAMP and you should be good to go.
If you like to work with php includes (see this post) then you need to set up Virtual Hosting. Go back to your http.conf file in step 5 and scroll way down to the bottom. Un-comment and edit the last line so it looks like this:
NameVirtualHost *:80
then add your version of the following:
DocumentRoot “/Users/yourname/Sites”
ServerName localhost
DocumentRoot “/Users/yourname/Sites/yoursite”
ServerName yoursite.local
In MAMP 2.0 around line 522 you’ll see the Virtual hosts line with this commented out:#Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
I left it and added the code shown above and everything is working as expected.
Finally, we need to edit the hosts file. Click on the Finder > Go > Go to Folder… and type /etc so you can open the hosts file in a text editor. (You will need to authorise this by typing in your password.)
Amend the file at line 7 so it reads:
127.0.0.1 localhost yoursite.local
and restart MAMP.
If you use Dreamweaver, go to Manage Sites, select your site and click the Edit button. Click on the Testing Server Category and for the URL Prefix, type: http://yoursite.local/
That’s it. Once MAMP is running, you can type the address at step 10 into the address bar of your browser and admire your website! _________________ car loan for bad credit |
|
Back to top |
|
 |
dustinedan2
Joined: 10 Mar 2013 Posts: 10
|
Posted: Sun Mar 10, 2013 10:19 am Post subject: |
|
|
As I was in the process of setting up a clean Mac Book Pro, I tried going through this process. ... I started with the latest version of MAMP 1.8.4 and MacPorts 1.8.2 installed. ... else may get Mac OS X installed or even MacPorts installed version _________________ cd duplication
dvd duplication |
|
Back to top |
|
 |
plumgallmann
Joined: 15 Mar 2013 Posts: 10
|
Posted: Fri Mar 15, 2013 4:43 am Post subject: |
|
|
Apple's latest $29 update to OS X Snow Leopard ships this Friday ... Snow Leopard will be released on August 28, and the curent version (1.7.2) of MAMP & MAMP PRO ... /Library/WebServer/Documents (from the value I'd previously set it ... I have the same MAMP start up issue as well on my 17" MacBook ...
----------
Plum Gallmann
online recruitment software
staffing software |
|
Back to top |
|
 |
Free Forum
|
|
Back to top |
|
 |
|