nnic
V2EX  ›  Apache

求教 apache 反向代理配置

  •  
  •   nnic · Sep 10, 2015 · 3175 views
    This topic created in 3940 days ago, the information mentioned may be changed or developed.

    服务器 A 反向代理请求到 服务器 B
    想要在 B 上面设置 basic 认证,且某些 client ip 可以不需要认证

    服务器上面 A 的反向代理要如何配置

    1 replies    2015-09-10 14:31:10 +08:00
    nnic
        1
    nnic  
    OP
       Sep 10, 2015
    我来自问自答好了
    在 B 服务器上面配置

    SetEnvIf X-Forwarded-For "^192\.168\." allowedIP
    AuthType Basic
    AuthName "Admin Login"
    AuthUserFile /etc/htpasswdFile
    Require valid-user
    Order allow,deny
    Allow from env=allowedIP
    Satisfy any
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3262 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 11:11 · PVG 19:11 · LAX 04:11 · JFK 07:11
    ♥ Do have faith in what you're doing.