sudo pico /etc/hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost localhost2 localhost3
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
localhost
, localhost2
, localhost3
you could actually put in the name of a project.httpd.conf
located in /Applications/MAMP/conf/apache
in a text editor of your choice (either TextEdit in plain text mode, TextWrangler or BBEdit will do)./Applications/MAMP/conf/apache
in a text editor of your choice (either TextEdit or BBEdit will do).#NameVirtualHost *:8888
Include /Applications/MAMP/conf/apache/vhosts.conf
# Virtual Hosts
#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for all requests that do not
# match a ServerName or ServerAlias in any block.
#
# ServerAdmin [email protected]
# DocumentRoot '/www/docs/dummy-host.example.com'
# ServerName dummy-host.example.com
# ServerAlias www.dummy-host.example.com
# ErrorLog '/private/var/log/apache2/dummy-host.example.com-error_log'
# CustomLog '/private/var/log/apache2/dummy-host.example.com-access_log common'
#
# ServerAdmin [email protected]
# DocumentRoot '/www/docs/dummy-host2.example.com'
# ServerName dummy-host2.example.com
# ErrorLog '/private/var/log/apache2/dummy-host2.example.com-error_log'
# CustomLog '/private/var/log/apache2/dummy-host2.example.com-access_log common'
ServerName localhost
DocumentRoot /Applications/MAMP/htdocs/
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
ServerName localhost2
DocumentRoot /Applications/MAMP/htdocs2/
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
ServerName localhost3
DocumentRoot /Applications/MAMP/htdocs3/
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
/Applications/MAMP/
. Create directories which will serve as documents folders for your virtual hosts:htdocs2
htdocs3
http://localhost2:8888/
Index of /
Apache/2.0.64 (Unix) PHP/5.3.5 DAV/2 Server at localhost2 Port 8888