1. Download the Mamp Kit
To https://www.mamp.info/en/
2. Install this. dmg file
3. Configure the Apache virtual host
(1) httpd.conf file found in/applications/mamp/conf/apache
Found in this file
# Virtual Hosts
Include/applications/mamp/conf/apache/extra/httpd-vhosts.conf
Remove the previous #
(2) Locate the httpd-vhosts.conf file in/applications/mamp/conf/apache/extra and configure the virtual host with the following code:
<virtualhost *: the>ServerAdmin localhost documentroot"/applications/mamp/htdocs/"ServerName localhost errorlog"Logs/localhost-error_log"Customlog"Logs/localhost-access_log"Common DirectoryIndex index.html index.htm index.php<directory/>Options followsymlinks #不允许别人修改我们的页面 allowoverride None #设置访问权限 order Deny,allow allow from All</Directory></VirtualHost>
(3) Configure the/etc/hosts file as follows:
127.0. 0.1 localhost255.255. 255.255 broadcasthost:: 1 localhost127.0. 0.1 www.test.com127.0. 0.1 Local.erp.com
4. Test:
Enter localhost:8888/index.php in the browser
Use Mamp to build PHP development environment on MAC system