1 2 Previous Next 23 Replies Latest reply on Oct 21, 2016 3:49 PM by sandyb1 Go to original post
      • 15. Re: mod_cluster and multiple virtual hosts
        dohancrp

        Hi all,


        I checked all the settings and they were as it is as you mentioned. And ProxyPreserveHost on did the trick! Thanks Jean-Frederic Clere! Even I didn't notice I have been using http. You are a genius. Now whole application is working like a charm in HTTP.

         

        But pardon me.. I have another problem now. I used redirection to https in the application config section like below.

         

        <VirtualHost *:80>

            ServerAdmin unix@tntpost.nl

            DocumentRoot /apps/www.application1.nl/data

            ServerName mydomain.com:80

            ErrorLog logs/www.application1.nl-error_log

            CustomLog logs/www.application1.nl-access_log combined

            LogLevel debug

         

            RewriteEngine On

            RewriteCond %{HTTPS} off

            RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

         

            ProxyPass / balancer://mycluster/application1 stickysession=JSESSIONID|jsessionid nofailover=On

            ProxyPassReverse / balancer://mycluster/application1

         

            ProxyPreserveHost on


        </VirtualHost>

         

        And my flex app is loading the UI fully and waits for some internal request. Browser shows "Waiting for mydomain.com..." in the status bar. I checked the logs and couldn't figure out the cause.

         

        access log:

        69.90.209.11 - - [07/Sep/2011:22:52:44 +0530] "GET /application1/ HTTP/1.1" 304 -

        69.90.209.11 - - [07/Sep/2011:22:52:44 +0530] "GET /application1/swfobject.js HTTP/1.1" 304 -

        69.90.209.11 - - [07/Sep/2011:22:52:45 +0530] "GET /application1/Main.swf HTTP/1.1" 304 -

        10.1.1.200 - - [07/Sep/2011:22:52:45 +0530] "STATUS / HTTP/1.0" 200 84

        10.1.1.200 - - [07/Sep/2011:22:52:45 +0530] "STATUS / HTTP/1.0" 200 84

        69.90.209.11 - - [07/Sep/2011:22:52:51 +0530] "GET /application1/messagebroker/amf HTTP/1.1" 200 -

        10.1.1.200 - - [07/Sep/2011:22:52:55 +0530] "STATUS / HTTP/1.0" 200 84

        10.1.1.200 - - [07/Sep/2011:22:52:55 +0530] "STATUS / HTTP/1.0" 200 84

         

        www.application1.nl-access_log:

        69.90.209.11 - - [07/Sep/2011:23:24:19 +0530] "POST /application1/messagebroker/amf HTTP/1.1" 302 240 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.18) Gecko/20110614 Firefox/3.6.18 (.NET CLR 3.5.30729)"

         

        Is it an ssl issue or a problem with the redirection settings I used?

        Many thanks.

        • 16. Re: mod_cluster and multiple virtual hosts
          dohancrp

          HTTPS Update:

          The reason for loading the UI was caching. After cleared out cache I am facing the old problem again which is redirecting to a local ip. I tried by adding

          ProxyPreserveHost on to <VirtualHost _default_:443> but no success. How can get this to work in HTTPS? Please help.

          • 17. Re: mod_cluster and multiple virtual hosts
            jfclere

            I guess you need a [R,L] at the end of:

              RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

             

            you should try ssl directly without the redirect before adding the rewrite rule...

            • 18. Re: mod_cluster and multiple virtual hosts
              dohancrp

              I tried following combinations:

              • Removed Rewrite settings, removed ProxyPreserveHost on  <VirtualHost _default_:443> and tried  https://mydomain.com/application1 --> redirecting to local ip
              • Removed Rewrite settings, added ProxyPreserveHost on <VirtualHost _default_:443> and tried https://mydomain.com/application1 --> recursive redirections shown in the error log and not loading the page
              • Added Rewrite settings with [R,L], removed ProxyPreserveHost on <VirtualHost _default_:443> and tried http://mydomain.com/application1 --> redirecting to local ip
              • Added Rewrite settings with [R,L], added ProxyPreserveHost on <VirtualHost _default_:443> and tried http://mydomain.com/application1 --> recursive redirections shown in the error log and not loading the page
              • 19. Re: mod_cluster and multiple virtual hosts
                dohancrp

                Hi folks,

                I moved to ajp instead of http and now http, https works well (I removed rewrite settings and ProxyPreserveHost setting). But I need to redirect user to https all the time for application1. When I added rewrite settings to do so applicaiton redirects well but can't login. If there any differences between going directly to https and via redirection?

                • 20. Re: mod_cluster and multiple virtual hosts
                  jfclere

                  "can't login" you probably have a direct in the AJP connector that uses the wrong port.

                   

                  And your recursive redirections before are probably wrong rewrite directive (try to redirect to http://mydomain.com/application1/ instead of http://mydomain.com/application1).

                  • 21. Re: mod_cluster and multiple virtual hosts
                    dohancrp

                    I am using default port on Server.xml

                     

                    <Connector protocol="AJP/1.3" port="8009" address="${jboss.bind.address}"

                             redirectPort="8443" />

                     

                    I suspect the problem with the redirection because when I disable it the app works fine. I changed the rewrite directive as you said but still the same problem. I used:

                     

                        RewriteEngine On

                        RewriteCond %{HTTPS} off

                        RewriteRule ^/application1/(.*)$ https://%{HTTP_HOST}/application1/$1 [R,L]

                     

                    If I not mislead you "Can't login" means when the flex application made a request to server the requets hangs.

                    Following is the log for perticular request:

                     

                    www.application1.nl-access_log

                    ip - - [09/Sep/2011:15:59:05 +0530] "POST /application1/messagebroker/amf HTTP/1.1" 302 240 "-" "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.22) Gecko/20110902 Firefox/3.6.22 ( .NET CLR 3.5.30729)"

                     

                    access_log

                    ip - - [09/Sep/2011:15:59:05 +0530] "GET /application1/messagebroker/amf HTTP/1.1" 200 -

                     

                    Thanks.

                    • 22. Re: mod_cluster and multiple virtual hosts
                      dohancrp

                      Found the solution for flex application problem: http://forums.adobe.com/message/2385927

                      Thank all for the support given.

                      Cheers

                      • 23. Re: mod_cluster and multiple virtual hosts
                        sandyb1

                        Hello Willem,

                         

                        Thank you for the steps on mod_cluster. I am in the same boat and want to configure apache -> jboss using mod_cluster. As outlined in chapter 3 (3.1/2/3) I downloaded the mod_cluster-1.3.1.Final-src-ssl under "jbosshome"/jboss-eap-6.4/domain/servers/deploy/ and extracted the contents. However I do not see any supporting files after the extraction (jbossweb.sar, server.xml, META-INF). Am I using the right download? I have the domain and servers all built and ready I am just trying to add the mod_cluster feature now. With EAP 6.4 can we just add the proxylist in domain.xml? Can you please help with the jboss side configuration of mod_cluster.

                        1 2 Previous Next