星空网 > 软件开发 > 操作系统

wampserver2.5下载、安装、虚拟主机配置详解

1,下载wampserver2.5

wampserver2.5 64位下载

wampserver2.5 32位下载

2,安装wampserver2.5

wampserver2.5下载、安装、虚拟主机配置详解images/loading.gif' data-original="http://www.shouce.ren/upload/image/20151112/1447341439908796.gif" data-bd-imgshare-binded="1" />

一直点击next就可以安装成功了,安装后电脑右下角会出现如下图标

wampserver2.5下载、安装、虚拟主机配置详解

红色框内显示绿色代表安装完成并成功启动了,默认是英文的现在我们切换为中文的=>右键点击绿色图标=>Language=>chinese。

3,wampserver虚拟主机配置

(这是我的安装目录)打开E:\wamp\bin\apache\apache2.4.9\conf\httpd.conf文件

在154行找到

  1. #LoadModule rewrite_module modules/mod_rewrite.so

去掉前面的 # 号

 

在515行找到

  1. #Include conf/extra/httpd-vhosts.conf

去掉前面的 # 号

 

打开E:\wamp\bin\apache\apache2.4.9\conf\extra\httpd-vhosts.conf

添加如下内容:

  1. NameVirtualHost *:80
  2. <VirtualHost *:80>
  3.     DocumentRoot "D:/phpxm/yanshi"
  4.     ServerName www.yanshi.com
  5.     ServerAlias www.yanshi.com yanshi.com
  6.     <Directory "D:/phpxm/yanshi">
  7.     Options Indexes FollowSymLinks
  8.     AllowOverride All
  9.     Require all granted
  10.     </Directory>
  11.     ErrorLog "D:/phpxm/yanshi/error.log"
  12.     CustomLog "D:/phpxm/yanshi/access.log" combined
  13. </VirtualHost>

 

打开C:\Windows\System32\drivers\etc\hosts文件

添加如下内容:

  1. 127.0.0.1       yanshi.com
  2. 127.0.0.1       www.yanshi.com

 

最后建立这个路径下D:/phpxm/yanshi建立index.php文件,index.php内容为hello。

 

重新启动wamp

 

浏览器中访问yanshi.com出现会出现如下界面表示配置成功了。

 

wampserver2.5下载、安装、虚拟主机配置详解




原标题:wampserver2.5下载、安装、虚拟主机配置详解

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流