码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2015-12-07 08:37:13      阅读:152      评论:0      收藏:0      [点我收藏+]

标签:

1,下载wampserver2.5

wampserver2.5 64位下载

wampserver2.5 32位下载

2,安装wampserver2.5

技术分享

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

技术分享

红色框内显示绿色代表安装完成并成功启动了,默认是英文的现在我们切换为中文的=>右键点击绿色图标=>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下载、安装、虚拟主机配置详解

标签:

原文地址:http://www.cnblogs.com/shouce/p/5025038.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!