一个VirtualHost的问题,不知道怎么形容啊,语文没学好啊!!
apache吧
全部回复
仅看楼主
level 1
jinngoo 楼主
打字就被删帖,老子发图!以后清一色发图!
2014年08月13日 15点08分 1
level 12
你需要的是,
再多设一个 VirtualHost 区块,
将其 DocumentRoot 设到 htdocs
假设你这区块的 ServerName 为 others.xxx.com
而且把这区块放在之前 VirtualHost 之前。
apache 会把所有访问做Host的检查,
如果符合任何一个 ServerName 就交给哪一区块处理,
如果没符合任何一个 ServerName,例如 www.xxx.com 或 1.2.3.4
就交给第一个 VirtualHost 区块来处理。
在 apache 上的手册是这样写的:
That means that if a request is received that does not match one of the specified ServerName directives, it will be served by this first VirtualHost.
2014年08月13日 23点08分 4
原来如此!! 话说 你怎么也直接四楼了~ 百度这删帖太二了
2014年08月14日 08点08分
1