Home > Backend Development > PHP Tutorial > wampserver vhost 能添加2个主机

wampserver vhost 能添加2个主机

WBOY
Release: 2016-06-23 13:55:54
Original
844 people have browsed it

wampserver vhost 能添加2个主机
1个域名 1个主机。。。 
比方说eee.wdd可以访问1个网站
dd.ss又能访问1个网站 本地哦


回复讨论(解决方案)

所以问题是什么?

怎么添加 2个。。

添加两个vhost就是了。
去搜索一下Apache配置虚拟主机的方法。


把这个放在apache conf里即可


ServerName a.com  //代表访问域名
DocumentRoot "G:/AppServ/www/a.com"  //代表网站目录



ServerName b.com
DocumentRoot "G:/AppServ/www/b.com"

还需要在windows 的etc下hosts配置下
127.0.0.1 a.com
127.0.0.1 b.com

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template