Apache代理不能用于response.sendredirect

我对Apache很新…需要帮助的问题。 可公开访问的url:http://testsite.com。 这个网站是BigIp ..其成员为localserver.com:21211所以,无论对testsite.com的请求都会转到localserver.com:21211

我使用Apache Web服务器(HTTPS),我有一个内部的Tomcat应用程序(运行HTTPS)都运行在同一主机。

所以,stream程是==> httpx://testsite.com ==> apache(https)==> Tomcat内部应用程序(https)

Tomcat应用程序使用2个servlet(首先是一个Servlet1,然后转到Servlet2),并保留剩余的会话

从servlet1到servlet2它做了一个response.sendRedirect(jsp); 其中jsp = ../../wsc/Servlet2?cmd=currentEnv&wscUser=*****&wscEnv=D2&clientId=****&wsc_SESSION_ID=-683682815967505906_1452611560873

所以..现在的configuration..我无法去servlet2 ..它总是失败,在Servlet1 404错误通过给这条path在日志==> httpx://testsite.com/wsc/Servlet1?clientId = ****&wscEnv = D2&ApplCode = WSC

我可以看到wsc_SESSION_ID正在创build应用程序日志中…但它没有得到转发的Servlet2

这是stream程:

  1. 无论请求到什么地方httpx://testsite.com应该被redirect到httpx://localserver.fmr.com:21211 / wsc / Servlet1

  2. redirect后,用户将通过siteminder单一loginvalidation(这工作正常)

  3. 然后所有的后续请求应该被转发到httpx://localserver.com:21201 / wsc / Servlet1(稍后redirect到Servlet2)

应用程序上下文是httpx://localserver.com:21201 / wsc / Servlet1和httpx://localserver.com:21201 / wsc / Servlet2

有人能帮我解决这个问题吗? 你可能会看到很多不必要的命令…但那是因为我尝试了不同的东西。

注意: 我在问题描述中使用了https作为httpx,因为我不允许在这个问题中放太多url。 对不起

现在的configuration:

<VirtualHost localhostname.com:21211> DocumentRoot "/apps/ers/servers/dev_ers/htdocs" ServerName localserver.com:21211 ServerAdmin [email protected] LogLevel debug ErrorLog logs/https_error.log TransferLog logs/https_access.log SSLEngine on SSLProtocol all -SSLv2 -SSLv3 SSLProxyEngine On SSLProxyCheckPeerCN off SSLProxyProtocol +TLSv1 SSLProxyVerify none SSLProxyCipherSuite ALL:!EDH:!DHE:!ECDHE:!ECDH:!ADH:RC4+RSA:!EDH:+HIGH:+MEDIUM:+LOW:!SSLv2:!3DES:!DES:+EXP ProxyPass / https://localhostname.com:21201/ ProxyPassReverse / https://localhostname.com:21201/ ProxyPreserveHost Off RewriteEngine On RewriteRule ^/$ https://localhostname.com:21211/wsc/Servlet1 [R] SSLCertificateFile ssl/dev_ers.crt SSLCertificateKeyFile ssl/dev_ers.key # SSLCACertificateFile /apps/ers/tools/ssl/ca-bundle.crt SetEnvIf User-Agent ".*MSIE.*" ssl-unclean-shutdown CustomLog logs/https_cipher.log "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" </VirtualHost>