setting up additional virtual servers on mamp w/o going pro?

Discussion in 'Web Design and Development' started by cutcopypaste, Mar 13, 2010.

  1. cutcopypaste macrumors regular

    Nov 28, 2008
    just wondering if there is a way, preferably not overly complicated, to achieve this.. just as testing certain php on my site is requiring that the site be in the root directory to make it work better..
    i've heard a lot of things about mamp pro being unstable and unsupported and much more error prone than the basic version.. but i know one of the main selling points is the multiple virtual servers. so wondering if they can be configure easily outside of mamp and how tricky it is.
  2. icrash macrumors newbie

    Dec 19, 2006
    just try the following:

    edit the httpd.conf file and append to the end:
    NameVirtualHost *:80
    <VirtualHost *:80>
    	ServerName [I]yourServerName[/I]
    	DocumentRoot "/Path/To/Your/DocumentRoot"
    Example for yourServerName: dev-something.local

    then add the yourServerName to your /etc/hosts file:

    Code: localhost [I]yourServerName[/I] 
    ...don't forget to make a backup from the files before starting!!!

    ...hope this helps...
  3. nuxx macrumors member


    Jun 5, 2007
    These instructions provide some additional info you may find helpful.

Share This Page