D:\xampp\htdocs\PROJECT\TPDEV\ABC
if I want to access the project/directory , Address bar: Localhost/project is it a hassle? Direct pj.com is not a bit simpler! Go directly to the operating procedure:
Prerequisite: 1, will install XAMPP
2. The first two steps are performed under the close Apache
1. add httpd-vhosts.conf virtual Host file
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/58/BC/wKioL1S6jjGytnrLAAEH1Xo6V_0422.jpg "title=" Qq20150118002318.png "alt=" Wkiol1s6jjgytnrlaaeh1xo6v_0422.jpg "/>
Open the file and add a session at the end:
<virtualhost *:80>
ServerNamepj.com
DocumentRoot "D:/xampp/htdocs/project"
<directory "D:/xampp/htdocs/project">
Options followsymlinks includesnoexec Indexes
DirectoryIndex index.html index.htm index.php
AllowOverride All
Order Deny,allow
Allow from all
Require all granted
</Directory>
</VirtualHost>
I want to enter in the address bar: www.pj.com Direct access to the local host under the/project folder, if pj.com is not accessed under the Internet, but you can not be bored to the host address set to www.baidu.com. then how will you visit Baidu?
2, Add the Hosts file path configure
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/58/BF/wKiom1S6jqHjoutXAAEIB4_lqVs925.jpg "title=" Qq20150118002225.png "alt=" Wkiom1s6jqhjoutxaaeib4_lqvs925.jpg "/>
Drag and drop the Hosts file to the desktop to open the Add Access address:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/58/BF/wKiom1S6j0KAmnANAABD3hcW4zQ513.jpg "title=" Qq20150118003455.png "alt=" Wkiom1s6j0kamnanaabd3hcw4zq513.jpg "/>
3, open XAMPP Apache server, address bar regardless of the input below any one is access to the project folder:
www.pj.com/
localhost/
127.0.0.1/
192.168.1.100/(local IP address of the current local area network)
4. Other folders ... etc...
This article from "Make a snail really good" blog, please be sure to keep this source http://smili.blog.51cto.com/8919945/1605220
Xampp How to set up multi-virtual host access