1, install Php+apach+mysql (XAMPP)
2, create a new folder in the directory: I was in the users/personal directory/workspace3, open/applications/xampp/xamppfiles/etc/httpd.conf,
Add the following content:
# XAMPP
Include etc/extra/httpd-xampp.conf
Include "/applications/xampp/xamppfiles/apache2/conf/httpd.conf"
Include "/users/wuzeguo/workspace/www_conf/*"
4, under workspace new Folder Www_conf5, modify the host file (/etc/hosts) 6, add conf file under www_conf (named after the project) if the project name is Hani, then the name is Hani.conf < VirtualHost *:80>
ServerAdmin [email protected]
#项目地址
Documentroot/users/wuzeguo/workspace/hani
DirectoryIndex index.html index.php index.htm index.shtml login.php
ServerName www.hani.com
Errorlog "Logs/mhd_error.log"
Customlog "Logs/mhd_error_common.log" common
<Directory/Users/wuzeguo/workspace/hani>
Options FollowSymLinks Indexes
AllowOverride All
#Order Allow,deny
#Allow from all
Require all granted
</Directory>
</VirtualHost>
How to configure the Web environment (PHP) under Mac