Setting up virtual host on local machine running MAMP 1.8.2

MAMP 1.8.2

MAMP 1.8.2 has been released and all is looking good. So what's been updated in this package:

  • compatible with Mac OS X 10.6 Snow Leopard
  • Apache 2.0.63
  • MySQL 5.1.37
  • PHP 4.4.9 & 5.2.10
  • APC 3.0.19 & APC 3.1.2
  • eAccelerator 0.9.5.3
  • XCache 1.2.2
  • phpMyAdmin 2.11.9.5 & phpMyAdmin 3.2.0.1
  • Zend Optimizer 3.3.3

The rest of the info can be found here: Version History (MAMP)

Anyway, this post is about adding virtual hosts to the httpd.conf file taken from the previous version (MAMP 1.7.2) as from my past blog post on how it's done. But strangely this time it failed. Not sure why but the fixed is below. You'll need to change it to:

First add this:


<VirtualHost *:80>
ServerName localhost
DocumentRoot “/Applications/MAMP/htdocs"
<Directory “/Applications/MAMP/htdocs">
Options Indexes FollowSymLinks Includes execCGI
AllowOverride None
Order Allow,Deny
Allow From All
</Directory>
</VirtualHost>

Then after, your own virtual host, something like this:

<VirtualHost *:80>
ServerName drupal.localhost
DocumentRoot "/Applications/MAMP/htdocs/drupal"
<Directory "/Applications/MAMP/htdocs/drupal">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

Remember, like the last time you'll still need to add the servername to your hosts file (/etc/hosts).

If you're running the PRO version then you can do all the virtual hosts in a few easy clicks via the GUI.

Updating MAMP

  • Rename the current program folder MAMP to MAMP_OLD
  • Load the installation image of MAMP from http://mamp.info and open it
  • Drag the MAMP folder from the installation image to your "Applications" folder
  • Copy the directories "htdocs" and "db" from your MAMP_OLD folder into the MAMP folder. It contains your personal HTML files and database contents. Overwrite the folders in the new MAMP folder
  • Check whether all data has been transferred correctly
  • The MAMP_OLD folder can now be deleted. You may however keep it, so you can fall back to your original setup

For those running Drupal, make sure you increase your memory_limit in php.ini file to about 128MB, otherwise you may encounter a white screen, in case you might think it's something else causing the issue.

Trackback URL for this post:

http://duvien.com/trackback/276

Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Mollom CAPTCHA (play audio CAPTCHA)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.