I'm trying to set it up on Mac OSX also, so I copied all the configuration, but I can't get virtual hosts to work.
1- I included this in /private/etc/hosts:
- Code: Select all
127.0.0.1 localhost
127.0.0.1 somedomain.local
2- I included this in httpd.conf:
- Code: Select all
DocumentRoot "/Volumes/Files/http"
Include etc/extra/httpd-vhosts.conf
3- I included this in httpd-vhosts.conf:
- Code: Select all
<VirtualHost 127.0.0.1>
DocumentRoot "/Volumes/Files/http"
ServerName "localhost"
</VirtualHost>
<VirtualHost 127.0.0.1>
DocumentRoot "/Volumes/Files/http/somedomain"
ServerName "somedomain.local"
</VirtualHost>
Which is basically the same configuration I have on Windows.
The result I get on MacOS is that any domain defined in the hosts file gets you to httpd.conf's DocumentRoot, I.E. /Volumes/Files/http and not to the virtual host's root.
Any ideas?