1》本地Apache安裝目錄
1:F:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.confphp
增長
#
# Use name-based virtual hosting.
#
NameVirtualHost *:80
<virtualhost *:80>
DirectoryIndex index.html index.php
ServerName web.cn
DocumentRoot "F:\wamp\www\commonlib\project_name\src\www"
<directory "F:\wamp\www\commonlib\project_name\src\www">
DirectoryIndex index.html index.htm index.php
AllowOverride All
Order allow,deny
Allow from all
</directory>
ErrorLog "logs/error.log"
CustomLog "logs/access.log" common
</virtualhost>
2:F:\wamp\bin\apache\apache2.4.9\conf\httpd.conf
開啓
Include conf/extra/httpd-vhosts.conf
3:配置本地host
127.0.0.1 web.cn
4重啓wamphtml