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)