Mac OSX configuration Xamp Virtual Host

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.