Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

cutcopypaste

macrumors regular
Original poster
Nov 28, 2008
176
29
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.
 
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...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.