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

    Joined:
    Nov 28, 2008
    #1
    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

    Joined:
    Dec 19, 2006
    #2
    just try the following:

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

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

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

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

    nuxx

    Joined:
    Jun 5, 2007
    Location:
    Tokyo
    #3
    These instructions provide some additional info you may find helpful.
     

Share This Page