下载
W : windows
A : Apache
M : MySQL
P : PHP
经常一起使用,打包成一个集成开发包
<p>官网:<a href="https://www.wampsever.com/" title="点我" >点我膜拜</a></p>
下载链接:点我下载1 ,点我下载2
WAMPServer服务控制面板介绍
phpMyadmin的默认用户为root,密码为空。
自定义网站目录
修改默认路径
1、修改Apache-httpd.conf文件中的
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
改为
DocumentRoot "learnphp"
<Directory "C:/Users/Administrator/Documents/learnphp">
2、修改httpd-vhost.conf
DocumentRoot C:/Users/Administrator/Documents/learnphp
<Directory "C:/Users/Administrator/Documents/learnphp/">
记得重启软件!!!
修改www 目录为自己想要的目录
1、打开wampmanager.ini搜索menu.left ,修改下面路径的值,下为修改好的。
Type: item; Caption: "learnphp"; Action: shellexecute; FileName: "C:/Users/Administrator/Documents/learnphp";
2、打开wampmanager.tpi搜索${w_wwwDirectory}改为learnphp,搜索${wwwDir}改为路径名C:/Users/Administrator/Documents/learnphp
Type: item; Caption: "learnphp"; Action: shellexecute; FileName: "C:/Users/Administrator/Documents/learnphp";
WAMPServer多站点配置
1、增加虚拟站点
打开httpd-vhost.conf复制并粘贴下面代码,一个代码块为一个虚拟站点。
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot C:/Users/Administrator/Documents/learnphp/web01
<Directory "C:/Users/Administrator/Documents/learnphp/web01/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
2、允许其他地址访问
修改httpd.conf
找到
#Include conf/extra/httpd-vhosts.conf
改为
Include conf/extra/httpd-vhosts.conf
在
# onlineoffline tag - don't remove
下添加
Allow from all
3、在系统的hosts文件中修改
增加如下:
127.0.0.1 web01.com
127.0.0.1 web02.com
此时就可以通过web01.com/test.php和web02.com/test.php访问了
参考链接:http://www.th7.cn/Program/php/201612/1026782.shtml
WAMPServer自拟定端口号
当80端口被占用时,可以修改为其他端口如:8080
方法:修改httpd.conf文件,需要修改两个地方。
ServerName localhost:80
Listen 0.0.0.0:80
Listen [::0]:80
把上述代码80改为8080
修改完了后需要用如下网站访问
web01:8080/test.php
注意:web默认端口是80,所以默认下不需要输入:8080,如果修改了默认,则需要输入。