2

I am very new to apache...need help on issue. publicly accessible url : httpx://testsite.com. This site is BigIp..which has member as localserver.com:21211....So, whatever request to testsite.com will go to localserver.com:21211

I am using apache webserver (https) and I have a internal tomcat application (running https) both running in same host.

So, the flow is ==> httpx://testsite.com ==> apache (https) ==> Tomcat internal application (https)

Tomcat application uses 2 servlets (first one Servlet1 and then go to Servlet2) and stays there for remaining session

from servlet1 to servlet2 it does a response.sendRedirect(jsp); where jsp = ../../wsc/Servlet2?cmd=currentEnv&wscUser=*****&wscEnv=D2&clientId=****&wsc_SESSION_ID=-683682815967505906_1452611560873

so..with the present configuration..I was not able to go to servlet2..It always fails in Servlet1 with 404 error by giving this path in the log ==> httpx://testsite.com/wsc/Servlet1?clientId=****&wscEnv=D2&ApplCode=wsc

I can see wsc_SESSION_ID is getting created in the applicaiton log...but its not getting forwarded Servlet2

Here is the flow :

  1. Whatever the request comes to httpx://testsite.com should be redirected to httpx://localserver.fmr.com:21211/wsc/Servlet1

  2. After redirecting the user will be validated through siteminder for single sign on.(this works fine)

  3. Then all the subsequent requests should be forwarded to httpx://localserver.com:21201/wsc/Servlet1 (later it redirects to Servlet2)

Application contexts are httpx://localserver.com:21201/wsc/Servlet1 and httpx://localserver.com:21201/wsc/Servlet2

Can some one help me on how to achieve this ? you might see lot of unnecessary commands...but thats because I was trying different things..

Note : I used https as httpx in my problem description as I was not allowed to put too many urls in the question. Sorry for that

Present 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>
2
  • Do nay one have idea on it ?
    – Bala
    Jan 13, 2016 at 13:02
  • What in the HTTP request is different when you wish to proxy to Servlet2 as opposed to Servlet1? You need some way to distinguish between the requests. Once you "know" that you can probably use a rewritecond/rewriterule with a [P] flay to proxy to the relevant backend.
    – Unbeliever
    Sep 27, 2016 at 11:30

0

You must log in to answer this question.

Browse other questions tagged .