Wamp Configuration of the development environment Apache Virtual host, Wampapache
site Developers in the local testing, often not a site, how can you enter the same domain name in the address bar above the "domain name" can be local access to the site? the Apache virtual host will be configured here!
1, find the apache\conf\httpd.conf file, find the code in the file #Include conf/extra/httpd-vhosts.conf the previous # Delete!
2, find the apache\conf\extra\httpd-vhosts.conf file, we will configure the virtual machine in this file! Open the file, you can put the code in front of a # of all delete, they just play the role of annotation, here keep them look more in the way!
3, the following talk about the role of each code,
Namevirtualhost is to set the port number of the virtual machine, there is no need to change him, unless you change the port number of the originally configured Wamp!
ServerAdmin e-mail address
DocumentRoot the virtual machine's home directory
ServerName the domain name of the virtual machine
Serveralias alias for this virtual machine domain name
Errorlog where the virtual machine error log is stored
Customlog where the virtual machine access log is stored
There is a common on the back of the customlog that represents the normal log format, and
Referer Record Visitor Source information
Agent records the version information of the visitor's agent software
Combined three types of bonding
Note the configuration of each virtual machine, within each of the VirtualHost tags
Here is an example
4. When you configure the good one virtual machine in the httpd-vhosts.conf file, you will change the directory to your virtual machine in httpd.conf, and the number of virtual machines will add as many directory tags as you want.
Here is an example
5, now when you use the domain name defined in the virtual machine to visit the site, you will find still inaccessible. Why is it? We're still in the final step, resolving our domain name to an IP address through a DNS server.
First, open the C:\Windows\System32\drivers\etc\hosts file locally, note that not the administrator to open as an administrator, you will find the following code
This is your original localhost is resolved IP address, now it is simple, you follow it in the following to resolve your domain name 127.0.0.1 on the line!
Then, you need to flush the DNS resolution cache, start-and-run cmd
Enter Ipconfig/flushdns hit ENTER after the appearance of the following screen to show success!
Now, you enter your domain name will be able to access your site properly!
wamp Basic Configuration Please enter
Configuring the Wamp development environment
This article belongs to Wang Yip Building's personal blog original, to reprint please indicate the source: Wang Ye Lou's personal blog www.ly89.cn
http://www.bkjia.com/PHPjc/1010332.html www.bkjia.com true http://www.bkjia.com/PHPjc/1010332.html techarticle WAMP Configuration of the development environment Apache Virtual Host, Wampapache site developers in the local testing, often not a site, that how to enter the same as the domain name in the address bar to lose ...