【问题标题】:Routing and filtering with Apache and ModSecurity使用 Apache 和 ModSecurity 进行路由和过滤
【发布时间】:2016-10-03 04:29:42
【问题描述】:

我在 WAF (ModSecurity) 后面有一个 Apache Web 服务器 (2.4)。 10 台远程主机具有静态 IP 地址并期望访问“test.com”。

我想根据远程 IP 地址做一些过滤和路由。

例如:

  • 当 192.168.1.1 到达 test.com 时,他得到 test.com/1/ 并且只有这个子目录。
  • 当 192.168.1.2 到达 test.com 时,他得到 test.com/2/ 并且只有这个子目录。

在 Web 服务器上,我尝试在 Virtual Hosts 配置中设置限制,但是由于 WAF 用作代理,Apache 接收到 WAF 的私有 IP 地址而不是远程主机的 IP 地址。

有人有任何解决方案来解决这个问题吗?

提前谢谢你。 汤姆

【问题讨论】:

    标签: apache virtualhost web-application-firewall


    【解决方案1】:

    可以轻松解决您的问题。 您应该使用 Vhost 配置并选择特定端口。

    例如:

    • 当 192.168.1.1 到达 test.com:8081 时,他得到 test.com/1/ 并且只有这个子目录。
    • 当 192.168.1.2 到达 test.com:8082 时,他得到 test.com/2/ 并且只有这个子目录。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-06-28
      • 2014-02-05
      • 2015-02-22
      • 2020-10-31
      • 2013-12-08
      • 2015-01-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多