Setting up virtual host on local machine running MAMP 1.8.2

Setting up virtual host on local machine running 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 server name 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 256MB, otherwise you may encounter a white screen, in case you might think it's something else causing the issue.

The content of this field is kept private and will not be shown publicly.
Your email address will be kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
PureVPN Namecheap.com A2Hostng