张金玲

博客园 首页 联系 订阅 管理

1》本地Apache安装目录

1:F:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf


增加
#
# 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重启wamp

posted on 2015-12-24 15:15  顶顶圈圈  阅读(433)  评论(0)    收藏  举报