Configuration of virtual domain names under Apache (Windows)

Source: Internet
Author: User

In our development through the virtual domain name to access a specified project is indeed very convenient, next teach you how to manually configure the virtual domain name (Apache server as an example)

First, we have to find the host file, Windows under this file in the C-disk windows\system32\drivers\etc\hosts, add the following content:

127.0.0.1 singwa.com
Local IP virtual domain name

Second, then we have to find the httpd.conf file, the corresponding location of the file in your Web server installation directory/\apache\conf\httpd.conf, find "Include conf/extra/httpd-vhosts.conf If there's a # in front, you need to erase it.

Third, find the httpd-vhosts.conf file
<virtualhost *:80>
ServerAdmin [email protected]
DocumentRoot "E:/bd/ems"//This directory for your project means to bind the virtual domain name to this directory
ServerName singwa.com//This is for you to configure the virtual domain name in host
Errorlog "Logs/dummy-host2.example.com-error.log"//error log file
Customlog "Logs/dummy-host2.example.com-access.log" common
</VirtualHost>

Then restart the server to access singwa.com to access your project.

Note: If the return does not restart, you review the error log, according to the prompt to resolve.


Singwa
Links: http://www.imooc.com/article/16798
Source: MU-Class Network
This article original published in Mu class network, reproduced please indicate the source, thank you for your cooperation!

Configuration of virtual domain names under Apache (Windows)

Related Article

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.