Configuration of the virtual domain name of PHP

Source: Internet
Author: User

The first step:

Open the location of the apace installation file, find htpd.confin the Conf directory, and double-click Open .

Remove the # number before 516 lines

Step Two:

Open the Windows folder under System32 under the drivers under the ETC folder, under Etc file double hit open hosts

My file location in the computer C:\Windows\System32\drivers\etc

You can add your own virtual domain name, such as 127.0.0.2 o2o.xue.com

Step Three:

Find your own Apache directory under apache\conf\extra\httpd-vhosts.conf

Here line 44th to line 50 is the newly added virtual domain location

VirtualHost Here you need to configure your domain name and the consistency in your Hosts file

ServerAdmin The domain address you set yourself

DocumentRoot the entrance to your project

ServerName The domain address you set yourself

Errorlog logs/your domain address-error.log

Customlog logs/your domain address-access.log

Fourth Step:

After restarting the Apache server, you can access it, for example:

Configuration of the virtual domain name of PHP

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.