0
点赞
收藏
分享

微信扫一扫

WAMP配置虚拟主机


问题背景:从网上下载了一个PHP项目A,A项目需要部署在网站的根目录下。

配置虚拟主机可以解决这个问题。
1.打开Apache的配置文件httpd.conf,并去掉#Include conf/extra/httpd-vhosts.conf前面的#!!

2.打开Apache的apache/conf/extra下的次配置文件httpd-vhosts.conf

3.在末尾增加

<VirtualHost *:80>
DocumentRoot "C:\wamp\www\default"
ServerName localhost
ServerAlias localhost
ErrorLog "C:\wamp\www\default/default-error.log"
CustomLog "C:\wamp\www\default/default.log" common
</VirtualHost>


4.重启Apache
5.访问
  ​​http://localhost​​直接访问到default目录下。

---------------------------------------------------------

 

举报

相关推荐

0 条评论