The following operations are based on the PHP environment already configured
Search from the Internet, and then the configuration of the next or relatively simple!
My environment directory is in/library/webserver/documents
The test can be created directly here a folder, which write a index.php random output of what
In the Finder ctrl+shift+g input/private/etc Enter find Apache2-"Find httpd.conf Open
#Virtual hosts
Include/private/etc/apache2/extra/httpd-vhosts.conf
Find this line of code and get rid of the # in front of include
Next:
Apache2/extra/httpd-vhosts.conf
<virtualhost *:80>
DocumentRoot "/library/webserver/documents/zend/test"
ServerName www.test.com
</VirtualHost>
Divert add the code as above. The catalogue is replaced by your own project directory! ServerName is the domain name you want to use to access the project.
Next:
Under the/private/etc directory, find the hosts this file, open Add on point to 127.0.0.1 www.test.com These places is best to copy, do not own hand knocking! ~ Free of Mistakes! Get upset with yourself!
After configuration, go to open terminal, enter sudo apachectl restart or sudo apachectl stop after sudo apachectl start
Multi-site configuration for Apache under Mac