Virtual Hosts not working right
-
i’ve tried everything i can think of but for whatever reason, when trying to use virtual host on my Mac (10.9 Mavericks), i can successfully run 2 virtual hosts, but if i attempt to add more, they just do not work. Obviously vhosts is turned on and working for 2 sites, but why on Earth can’t i add more? Shouldn’t it just work, or not work?
i’m currently using MAMP, although in frustration i went so far as to attempt to just ditch MAMP and ‘go native’, installing PHP, MySQL and using OSX built in apache… oddly enough – same thing. 2 virtual hosts work. Arrrggg.
for reference i have :
added the domains to the hosts file (as example)
127.0.0.1 site1.dev
127.0.0.1 site2.dev, etc.
uncommented ‘Include…httpd-vhosts.conf’ in httpd.conf, and
added the domains to the httpd-vhosts.conf file (as example):<VirtualHost *:80> DocumentRoot "/Users/jamiejones/Sites/site1” ServerName site1.dev </VirtualHost>i’ve also tried adding various directory settings as in the following example:
<VirtualHost *:80> DocumentRoot "/Users/jamiejones/Sites/sheilahixson” ServerName sheilahixson.dev ServerAlias www.sheilahixson.dev <Directory "/Users/jamiejones/Sites/sheilahixson"> DirectoryIndex index.php index.html AllowOverride all Options -MultiViews Order allow,deny Allow from all </Directory> </VirtualHost>Any help would be most appreciated. I have to start a new wordpress site next week, and i’d love to be able to develop it locally with vhosts enabled. Help!
The topic ‘Virtual Hosts not working right’ is closed to new replies.