wamp5多站点配置教程

第一要做的是安装第二个apache服务
一、找到Apache2的htppd.conf文件.例如:我的wamp是安装在G盘的,我的就是G:\wamp\Apache2\conf目录下.大家自己的是安装在哪里的自己换路径,后面不再重复说这话了。
二、复制htppd.conf,粘贴后在conf目录下后更名www2.conf (这里www2是自定义的,你想变成什么名字都可以。不过没试过中文的可行不。)
三、用用编辑器打开(用什么编辑器无所谓了,记事本就可以)打开www2.conf 找到如下代码
Listen 80
ServerName localhost:80
DocumentRoot "G:/wamp/www"
<Directory "G:/wamp/www">
更改为
Listen 8080 //8080是新的apache服务监听的端口,可以自己改成自己想监听的。例如:8888
ServerName localhost:8080
DocumentRoot "G:/wamp/www2" //www2是我们第二个网站的目录
<Directory "G:/wamp/www2">
然后在G:/wamp下建一新文件夹为 www2
四、接下来就是安装服务了,
方法一:打开G:\wamp\Apache2\bin目录,新建一个txt文档,文档内容如下:(红色字部分)
httpd.exe -k install -n "www2" -f "G:\wamp\Apache2\conf\web2.conf"

保存后,更改文件名字以及后缀为www2.bat,双击运行就可以了
方法二:windows下面点击“开始”-“运行”输入“cmd”然后回车,打开命令提示符
把命令提示符切换到G:\wamp\Apache2\bin
输入
httpd.exe -k install -n "www2" -f "G:\wamp\Apache2\conf\web2.conf"
后按回车就可以了。
然后我们在www2下放一个html文件来做测试,在ie输入 http://localhost:8080 OK。服务正常

第二要做的就是服务安装好之后 就是怎么用wamp控制台来控制新安装的服务了
一、打开wamp目录,找到wampmanager.ini用编辑器打开(用什么编辑器无所谓了,记事本就可以)
二、主要更改的有(更改过的是红色的)
1
[Services]
Name: wampapache
Name: wampmysqld

[Services]
Name: wampapache
Name: wampmysqld
Name: www2

2
[StartupAction]
Action: service; Service: wampapache; ServiceAction: startresume; Flags: ignoreerrors
Action: service; Service: wampmysqld; ServiceAction: startresume; Flags: ignoreerrors

[StartupAction]
Action: service; Service: wampapache; ServiceAction: startresume; Flags: ignoreerrors
Action: service; Service: wampmysqld; ServiceAction: startresume; Flags: ignoreerrors
Action: service; Service: www2; ServiceAction: startresume; Flags: ignoreerrors

3
[Menu.Left]
Type: separator; Caption: "WAMP5"
Type: item; Caption: "Localhost"; Action: run; FileName: "C:\WINDOWS\explorer.exe"; Parameters: "http://localhost/"; Glyph: 5
Type: item; Caption: "phpMyAdmin"; Action: run; FileName: "C:\WINDOWS\explorer.exe"; Parameters: "http://localhost/phpmyadmin/"; Glyph: 5
Type: item; Caption: "www 目录(&)"; Action: shellexecute; FileName: "G:/wamp/www"; Glyph: 5

[Menu.Left]
Type: separator; Caption: "WAMP5"
Type: item; Caption: "Localhost"; Action: run; FileName: "C:\WINDOWS\explorer.exe"; Parameters: "http://localhost/"; Glyph: 5
Type: item; Caption: "Localhost:8080"; Action: run; FileName: "C:\WINDOWS\explorer.exe"; Parameters: "http://localhost:8080/"; Glyph: 5
Type: item; Caption: "phpMyAdmin"; Action: run; FileName: "C:\WINDOWS\explorer.exe"; Parameters: "http://localhost/phpmyadmin/"; Glyph: 5
Type: item; Caption: "www 目录(&)"; Action: shellexecute; FileName: "G:/wamp/www"; Glyph: 5
Type: item; Caption: "www2目录(&)"; Action: shellexecute; FileName: "G:/wamp/www2"; Glyph: 5

4
[StartAll]
Action: service; Service: wampapache; ServiceAction: startresume; Flags: ignoreerrors
Action: service; Service: wampmysqld; ServiceAction: startresume; Flags: ignoreerrors

[StartAll]
Action: service; Service: wampapache; ServiceAction: startresume; Flags: ignoreerrors
Action: service; Service: www2; ServiceAction: startresume; Flags: ignoreerrors
Action: service; Service: wampmysqld; ServiceAction: startresume; Flags: ignoreerrors

5
[StopAll]
Action: service; Service: wampapache; ServiceAction: stop; Flags: ignoreerrors
Action: service; Service: wampmysqld; ServiceAction: stop; Flags: ignoreerrors

[StopAll]
Action: service; Service: wampapache; ServiceAction: stop; Flags: ignoreerrors
Action: service; Service: www2; ServiceAction: stop; Flags: ignoreerrors
Action: service; Service: wampmysqld; ServiceAction: stop; Flags: ignoreerrors

6
[RestartAll]
Action: service; Service: wampapache; ServiceAction: stop; Flags: ignoreerrors waituntilterminated
Action: service; Service: wampmysqld; ServiceAction: stop; Flags: ignoreerrors waituntilterminated
Action: service; Service: wampapache; ServiceAction: startresume; Flags: ignoreerrors waituntilterminated
Action: service; Service: wampmysqld; ServiceAction: startresume; Flags: ignoreerrors waituntilterminated

[RestartAll]
Action: service; Service: wampapache; ServiceAction: stop; Flags: ignoreerrors waituntilterminated
Action: service; Service: www2; ServiceAction: stop; Flags: ignoreerrors waituntilterminated
Action: service; Service: wampmysqld; ServiceAction: stop; Flags: ignoreerrors waituntilterminated
Action: service; Service: wampapache; ServiceAction: startresume; Flags: ignoreerrors waituntilterminated
Action: service; Service: www2; ServiceAction: startresume; Flags: ignoreerrors waituntilterminated
Action: service; Service: wampmysqld; ServiceAction: startresume; Flags: ignoreerrors waituntilterminated

7
[myexit]
Action: service; Service: wampapache; ServiceAction: stop; Flags: ignoreerrors
Action: service; Service: wampmysqld; ServiceAction: stop; Flags: ignoreerrors
Action: exit

[myexit]
Action: service; Service: wampapache; ServiceAction: stop; Flags: ignoreerrors
Action: service; Service: www2; ServiceAction: stop; Flags: ignoreerrors
Action: service; Service: wampmysqld; ServiceAction: stop; Flags: ignoreerrors
Action: exit

三、更改完成之后保存,并重启wamp就ok了。下面图是我在机子上装有3个服务之后的样子了。

我不说具体的更改的用处是希望大家能自己琢磨下,想表达的观点:最好学习方法就是实践

wamp5多站点配置教程的更多相关文章

  1. Apache多站点配置教程

    看见这个版关于网络程序方面的文章还比较少,下面来一发~实践证明,本教程适用于Apache 2.2.22,其他版本相差应该不大 我的博客:http://wislab.net/,希望跟大家多多交流噢 Ap ...

  2. Windows下Nginx Virtual Host多站点配置详解

    Windows下Nginx Virtual Host多站点配置详解 此教程适用于Windows系统已经配置好Nginx+Php+Mysql环境的同学. 如果您还未搭建WNMP环境,请查看 window ...

  3. win7安装iis及web配置教程

    下面iis教程只适用win7或win8系统的服务器配置,如果您使用的是xp系统或win2003系统请看:xp或2003安装iis及web配置教程 .注:新手如果嫌iis安装配置麻烦建议下载PageAd ...

  4. 转自《https安全链接的配置教程:startSSl免费证书申请与nginx的https支持配置》

    一.什么是 SSL 证书,什么是 HTTPS 网站? SSL证书是数字证书的一种,类似于驾驶证.护照和营业执照的电子副本.SSL证书通过在客户端浏览器和Web服务器之间建立一条SSL安全通道(Secu ...

  5. jdk eclipse SDK下载安装及配置教程

    原文地址https://blog.csdn.net/dr_neo/article/details/49870587 最新鲜最详细的Android SDK下载安装及配置教程 最近Neo突发神经,想要将学 ...

  6. php多站点配置以及Forbidden You don't have permission to access / on this server问题解决

    php多站点配置以及Forbidden You don't have permission to access / on this server问题解决 一.总结 一句话总结:我的问题是php的版本问 ...

  7. 使用Docsify做文档网站的详细配置教程

    使用Docsify做文档网站的详细配置教程 作者:xhemj 没错,它叫Docsify. xhemj的文档中心就是用这个写的 开源地址:https://github.com/docsifyjs/doc ...

  8. Apache多站点配置及启动失败解决办法

    一. Apache多站点配置方法 1.打开Apache安装目录下conf/httpd.conf文件,找到下面两行文字,把最前面的 # 号去掉,然后保存. #LoadModule vhost_alias ...

  9. Ubuntu系统下lnmp环境搭建和Nginx多站点配置

    最近需要使用Ubuntu作为服务器搭建Lnmp环境,顺便将操作过程写下来,与大家分享.如有不足之处,欢迎大家提出不同意见.(本文默认读者已经熟悉相关linux命令的使用,比如创建文件和文件夹,编辑文件 ...

随机推荐

  1. 谱聚类(Spectral clustering)(1):RatioCut

    作者:桂. 时间:2017-04-13  19:14:48 链接:http://www.cnblogs.com/xingshansi/p/6702174.html 声明:本文大部分内容来自:刘建平Pi ...

  2. Andriod Studio中setText输出中文在AVD中显示乱码的解决方法

    protected void onCreate(Bundle savedInstanceState) {        super.onCreate(savedInstanceState);      ...

  3. Java生成二维码QRCode.jar

    所需jar包:QRCode.jar:http://download.csdn.net/detail/xuxu198899223/7717745 package ewm; import java.awt ...

  4. ev3dev :利用ssh登录系统

    ev3dev是在debian 8 的基础上修改的,主页上只介绍了利用usb连接系统后,ssh登录的方法. 可是我想用wifi连接到网络后,用ssh登录,非usb线连接. ev3dev的默认用户名为:r ...

  5. 【Android】3.7 UI控制功能

    分类:C#.Android.VS2015.百度地图应用: 创建日期:2016-02-04 一.简介 简介:介绍开关手势功能和显示隐藏UI控件 详述: (1)地图操作开关:平移.缩放.双击放大.双指操作 ...

  6. 用Visual Studio Code写Node和调试代码

    介绍 vsc的宣传语是: 一个运行于 Mac OS X.Windows和 Linux 之上的,针对于编写现代 Web 和云应用的跨平台源代码编辑器. 按它说的,vsc特别适合来作为前端开发编辑器. 内 ...

  7. ORACLE 多列合并成一行数据 WM_CONCAT函数以及REPLACE

    WM_CONCAT()方法 注意字符长度 SELECT BERTHCODE,tpf.freedatetype, ( SELECT WM_CONCAT(SBPT.PARKSTIME||'~'||SBPT ...

  8. PHP源代码生成 main/config.w32.h

    PHP源代码生成 main/config.w32.h 1.下载php源代码包php-5.4.0.tar.gz,解压到D:\php-5.4.0 2.下载2个必要的包http://xiazai.jb51. ...

  9. Oracle PLSQL Demo - 19.管道function[查询整表组成list管道返回]

    create or replace function function_demo RETURN emp PIPELINED as Type ref_cur_emp IS REF CURSOR RETU ...

  10. Servlet打印HTML页面乱码问题

    代码就在下面,最开始我以为是request和response的编码问题,还去搞了一个filter,结果最后发现跟filter半毛钱关系都没有,都是因为没有打印这么一句 out.println(&quo ...