1. Find the Hosts file under C:\Windows\System32\drivers\etc, add the following content at the end of the file:
Mysite.net
It should be noted that this hosts file may not be saved, the solution is to copy the hosts file to another location (such as the desktop), modified after the copy back, the original file can be overwritten.
2, open the Apache configuration file httpd.conf, find include conf/extra/httpd-vhosts.conf this line, if the sentence preceded by a #, remove it.
3, open Apache in Conf\extra under the httpd-vhosts.conf file, in the last write:
(1) Under PHP2.2
Namevirtualhost *:80<virtualhost *:80>mysite. net"D:\xampp\htdocs\mysite" <directory "D:\xampp\htdocs\mysite" >Options FollowSymLinks includesnoexec indexesdirectoryindex index. html index.htm index.sHTML default.html Default.htm index.php default. PHP allowoverride all Order Deny,127.0.0.1 </Directory> </VirtualHost>
(2) Under PHP2.4
<virtualhost 127.0.0.1:80>mysite. net"D:\xampp\htdocs\mysite" <directory "D:\xampp\htdocs\mysitedefault Default.htm index.php defaultphpallowoverride allRequire all deniedrequire IP 127.0.0.1:: 1Require Local </Directory></VirtualHost>
4. Restart Apache, enter in browsermysite.netYou will be able to accessD:\xampp\htdocs\mysiteThis project.
Note: Replace the contents of the Red color section above with the virtual domain name you want to use, and replace the blue part with the path to the corresponding item store.
Blog statement:
All the articles in this blog, in addition to the title "reproduced" In the words, all the rest of the articles are my original or in the review of the information after the completion of the reference to non-reproduced articles please indicate this statement. --Blog Park-pallee
Apache under Virtual Host settings for Windows environments