In the front-end work, sometimes need to configure the environment, this article is mainly recorded in the Wamp to configure the virtual host
First of all need to download Wamp software and NAVICAT database management software for management, the following default has been downloaded the required software. and open the service.
The first step: the SQL file
Open Navicat, right-localhost-new Database
Name the new data table, the following two do not have to make a choice, the default is good
Select New data table, import SQL file
Click Start, after successful import close
Step two, configure the site
1, create a new folder (e.g. Tailiang)
Open terminal, enter sudo vim/etc/hosts (enter password, enter new URL), such as Enter 127.0.0.1 local.tailiang.com
Note: 1, click First. I can enter edit state
2, when added is complete, press ESC to exit the edit state, and press SHIFT + ZZ (Note that two times Z) to save and exit.
2, enter sudo vim/applications/xampp/xamppfiles/etc/httpd.conf on the terminal (enter port number setting), after setting, press ESC to exit the edit state, press SHIFT + ZZ (Note that two times Z) to save and exit.
3, enter sudo vim/applications/xampp/xamppfiles/etc/extra/httpd-vhosts.conf on the terminal to configure the URL. Press ESC to exit the edit state, and press SHIFT + ZZ (Note that two times Z) to save and exit.
4, give the file read and Write permission, enter sudo chmod-r 777 www on the terminal .
Configuration complete
Step Three:
Modify the configuration database catalog file for the project config.php, modify the database name 123
URL configuration is complete, restart the service, enter http://local.tailiang.com:8084/in the browser. You can see the URL you just configured
Mac OSX configuration Xamp Virtual Host