No estoy seguro de lo que está pasando aquí, pero estoy corriendo MAMP 1.9 en Mac OS X. En mi archivo httpd.conf, el DocumentRoot se establece en el camino htdocs defecto. Dentro de la carpeta htdocs, he creado una serie de "subsitios" en un esfuerzo para configurarlas como hosts virtuales .... puedo llegar a las rutas especificadas, pero todos ellos parece que por defecto el primero configuro .MAC OS X: MAMP Medio Ambiente y de máquinas virtuales
Esencialmente, el primer host virtual configuré era para site1.localhost.com. Desde entonces he configurado site2.localhost.com y site3.localhost.com. Sin embargo, yendo a cualquiera de las dos últimas direcciones, siempre parece redirigirme a site1.localhost.com. Además, yendo a localhost.com:8888 también solo obtiene el sitio1.localhost.com. No estoy seguro de que he hecho un paso en falso, pero es de esperar que alguien aquí a ser capaz de ayudarme a averiguar el problema ... Ah, y he reiniciado Apache, etc., después de cualquier cambio hacerse tanto en/etc/hosts o archivo httpd.conf.
En mi archivo httpd.conf (las partes pertinentes, de todos modos ...):
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
# MAMP DOCUMENT_ROOT !! Don't remove this line !!
DocumentRoot "/Applications/MAMP/htdocs"
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/Applications/MAMP/htdocs">
<VirtualHost *>
DocumentRoot "/Applications/MAMP/htdocs/site1/"
ServerName site1.localhost.com
</VirtualHost>
<VirtualHost *>
DocumentRoot "/Applications/MAMP/htdocs/sub/site2/"
ServerName site2.localhost.com
</VirtualHost>
<VirtualHost *>
DocumentRoot "/Applications/MAMP/htdocs/sub/site3/"
ServerName site3.localhost.com
</VirtualHost>
En mi/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
127.0.0.1 site1.localhost.com
127.0.0.1 site2.localhost.com
127.0.0.1 site3.localhost.com
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
ahhh gracias! ¡Me estaba volviendo loco! – locrizak