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. mysql 监控qps脚本

    mysqladmin -h172.16.200.43 -uroot -p status -i 1 #!/bin/bash mysqladmin -uroot -h172.16.200.43 -p'00 ...

  2. React.Fragment 的作用:代替div作为外层

    https://segmentfault.com/a/1190000013220508 import React, { Fragment } from 'react'; <Fragment> ...

  3. django 模板使用静态文件

    1.新建项目 2.新建app,并在install_app中添加该app 3.和app文件夹并列新建static.和TEMPLATES  文件夹,分别放静态文件和模板 4.setting.py中设置 T ...

  4. mac下安装mysqlcient 报错

    一.我在mac下pip3安装mysqlclient 报错: pip3 install mysqlclient Collecting mysqlclient Using cached mysqlclie ...

  5. 深入浅出 妙用Javascript中apply、call、bind【转】

    网上文章虽多,大多复制粘贴,且晦涩难懂,我希望能够通过这篇文章,能够清晰的提升对apply.call.bind的认识,并且列出一些它们的妙用加深记忆. apply.call 在 javascript ...

  6. php的安装

    首先我们安装nginx #0.安装ningx(可选cd /disk1/toolsrpm -ivh  http://nginx.org/packages/centos/6/noarch/RPMS/ngi ...

  7. Spring Boot(一):初步认识

    简介 Spring Boot是由Pivotal团队提供的全新框架,其设计目的是用来简化新Spring应用的初始搭建以及开发过程.该框架使用了特定的方式来进行配置,从而使开发人员不再需要定义样板化的配置 ...

  8. Android 开发之 bindService() 通信

    Service 启动方式有两种 startService(intent) bindService(intent,conn,Context.BIND_AUTO_CREATE) startService( ...

  9. [svc][op]vim常用命令汇总

    vim常用命令汇总: 定位 本行第一个字符 ctrl+$ 本行最后一个字符 0gg 文章首行 ctrl+G 文章行尾 u 撤销(Undo) 删除 D 从当前位置删除到行尾 ("d$" ...

  10. Oracle PLSQL Demo - 18.02.管道function[查询零散的字段组成list管道返回] [字段必须对上]

    --PACKAGE CREATE OR REPLACE PACKAGE test_141215 is TYPE type_ref IS record( ENAME ), SAL )); TYPE t_ ...