小编Set*_*aki的帖子

Apache:基于客户端 IP 的 DocumentRoot

我不知道这是否可以在 apache 上实现,在来到这里之前我已经做了大量的研究。但:

我有一个 VirtualHost 运行在 **:80*,ServerName 到 somedomain.tld。我想要实现的是,如果客户端 10.2.1.4 访问 somedomain.tld,客户端将从 DocumentRoot /var/www/pages-1/ 获得内容。那么如果 10.3.0.* 访问同一个 somedomain.tld,客户端将从 DocumentRoot /var/www/pages-2/ 获取内容。目前有没有办法实现这一目标?

virtualhost documentroot apache-2.2

6
推荐指数
1
解决办法
5325
查看次数

标签 统计

apache-2.2 ×1

documentroot ×1

virtualhost ×1