Apache 转发代理多个位置,多重认证作为基于位置指令的身份验证

问题描述

目标 os 创建具有多个目的地的转发代理,并具有基于位置指令的多个证书。我一直在阅读一些配置,我想知道配置是否正确

这是基本配置:

Listen 0.0.0.0:8080
SSLProxyMachineCertificateChainFile /etc/httpd/certs/client-CAcerts.pem
SSLProxyMachineCertificateFile /etc/httpd/certs/client-certkey.pem

<VirtualHost *:8080>
    ServerName someservername.example.com
    SSLProxyEngine On
    SSLProxyCheckPeerName on
    SSLProxyCheckPeerCN on
    SSLProtocol TLSv1.2
    SSLProxyCipherSuite ECDHE-RSA-AES256-GCM-SHA384:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:ECDHE-RSA-AES256-GCM-SHA384
    ErrorLog /var/log/httpd/server-8080_error.log
    CustomLog /var/log/httpd/server-8080_access.log combined
    ProxyRequests Off
    ProxyPreserveHost Off
    <Proxy *>
    Order deny,allow
    Allow from all
    </Proxy>

以及基于位置的配置指令

<Location /a-company.com/>
    <proxy https://a-company.com>
      ProxySet timeout=301 connectiontimeout=31
      SSLProxyMachineCertificateFile "/etc/apache/certs/a-company.pem"
    </proxy>      
  </Location>
  
  <Location /b-company.com/>
    <proxy https://a-company.com>
      ProxySet timeout=301 connectiontimeout=31
      SSLProxyMachineCertificateFile "/etc/apache/certs/b-company.pem"
    </proxy>      
  </Location>

或者位置配置应该是这样的:

  <Location /a-company.com/>
    <proxy https://a-company.com>
      ProxyPass https://a-company.com:443/ timeout=301 connectiontimeout=31
      ProxyPassReverse https://b-company.com:443/
      SSLProxyMachineCertificateFile "/etc/apache/certs/a-company.pem"
    </proxy>      
  </Location>

Any help is very much appreciated.
  
  
  <Location /b-company.com/>
    <proxy https://b-company.com>
      ProxyPass https://b-company.com:443/ timeout=301 connectiontimeout=31
      ProxyPassReverse https://b-company.com:443/
      SSLProxyMachineCertificateFile "/etc/apache/certs/b-company.pem"
    </proxy>      
  </Location>

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)