配置本地服务器

1、在C:\wamp\vhosts\vhost.conf文件中添加

<VirtualHost *:80>
ServerName ***.com
ServerAlias ***.com
DocumentRoot D:\PHP\*** --项目路径
DirectoryIndex index.php index.html index.htm
<Directory D:\PHP\***>--项目路径
Options +Includes -Indexes
AllowOverride All
Order Deny,Allow
Require all granted
</Directory>
</VirtualHost>

 

2、在C:\Windows\System32\drivers\etc\hosts里面添加

127.0.0.1       ***.com

 

3、打开httpd.conf 找到最后

#IncludeOptional "c:/wamp/vhosts/*"
Include "c:/wamp/alias/*"  去掉前面的#号

重启服务器

 

posted @ 2016-01-04 09:54  FinnYY  阅读(171)  评论(0编辑  收藏  举报