我需要代理反向IIS7中的一些URL,但我遇到了一些问题 .

当我使用ProxyPreserveHost On在ProxyPass和ProxyPassReverse字符串上设置“https”时,该站点因404错误而失败 . 如果我在ProxyPass和ProxyPassReverse上设置http,该网站就可以正常工作 .

1-使用以下配置打开网站,但由于协议与协议http / https不匹配,因此只打开一些页面:

ProxyPreserveHost开启

ProxyPass / http://IISserver.com/

ProxyPassReverse / http://IISserver.com/

2-使用以下配置,网站无法打开(404错误) . 这应该是网站工作正常的最佳配置:

ProxyPreserveHost开启

ProxyPass / https://IISserver.com/

ProxyPassReverse / https://IISserver.com/


3-此配置网站打开,但只是某些页面无法打开,因为与 Headers 不匹配:

ProxyPreserveHost关闭

ProxyPass / https://IISserver.com/

ProxyPassReverse / https://IISserver.com/


PS:Apache和IIS使用相同的证书(通配符)

使用ProxyPreservHost On时,apache(https)和IIS(https)之间是否存在某些限制,或者我需要执行其他配置才能工作?

你们知道我怎么能选择2作品?

这是我当前的代理反向配置:

ServerName sitename.com
    ErrorLog logs/errorSSL_log
    CustomLog logs/accessSSL_log common

    SSLEngine on
    SSLProxyEngine on
    SSLProxyVerify none
    SSLProtocol all -SSLv2 -SSLv3 +TLSv1
    SSLCipherSuite ALL:!aNull:!EDH:!DH:!ADH:!eNull:!LOW:!EXP:RC4+RSA+SHA1:+HIGH:+MEDIUM

    SSLCACertificateFile /opt/certificate/CertCA.crt
    SSLCertificateFile /opt/certificate/certificate_com.crt
    SSLCertificateKeyFile /opt/certificate/certificate.key

    RewriteEngine on
    RewriteCond     %{REQUEST_URI} ^/$
    RewriteRule     ^/(.*)$ https://sitename.com/context/Index$1 [r=301,l]

    ProxyPreserveHost On

    ProxyPass /  http://IISserver.com/
    ProxyPassReverse / http://IISserver.com/