5 Replies Latest reply on Dec 1, 2012 1:25 PM by amtowsbnp

    rhq and mod_proxy

    miniskipper miniskipper Newbie

      I can't get rhq and apache's mod_proxy work together. When setting a ProxyPass like this:


      ProxyPass /rhq  http://<otherserver>:7080

      ProxyPassReverse /rhq  http://<otherserver>:7080


      and then try opening the site https://<domain>/rhq i get the following error:


      The requested URL /installer/welcome.jsf was not found on this server.




      Any advice?

        • 1. Re: rhq and mod_proxy
          Ian Springer Master

          That's not supported, due to the fact that there are numerous places in the RHQ GUI code base that assume that the GUI is deployed to the root context.

          • 2. Re: rhq and mod_proxy
            miniskipper miniskipper Newbie

            Thanks for the clarification about the Proxy.


              ProxyPass /  http://<otherserver>:7080

              ProxyPassReverse /  http://<otherserver>:7080

            works, except on strange issue:


            When trying to log in, i get the error "Database not available".

            When i then press F5 i instantly get to the dashboard and all works  o0

            • 3. Re: rhq and mod_proxy
              Ian Springer Master

              Are there any error messages in the RHQ Server log, during the time when the "Database not available" error occurred in the GUI?

              • 4. Re: rhq and mod_proxy
                miniskipper miniskipper Newbie

                No error in the log. When connecting from local network it works as expected. Since connections from "outside" are rare, this is no big deal. Thanks for your help regarding mod_proxy.

                • 5. Re: rhq and mod_proxy
                  amtowsbnp Newbie

                  I encountered the "Database not available" message after attempting to proxy RHQ using mod_proxy...

                  I managed to get it to work as expected though using the following configuration.


                  <Proxy balancer://jon>




                  # Used by JON

                  Header edit Location ^ https://myserver.example.com/jon


                  ProxyPass /jon balancer://jon

                  ProxyPassReverse /jon balancer://jon


                  ProxyPass /installer balancer://jon/installer

                  ProxyPassReverse /installer balancer://jon/installer

                  ProxyPass /resource balancer://jon/resource

                  ProxyPassReverse /resource balancer://jon/resource

                  ProxyPass /a4j balancer://jon/a4j

                  ProxyPassReverse /a4j balancer://jon/a4j

                  ProxyPass /css balancer://jon/css

                  ProxyPassReverse /css balancer://jon/css

                  ProxyPass /js balancer://jon/js

                  ProxyPassReverse /js balancer://jon/js

                  ProxyPass /images balancer://jon/images

                  ProxyPassReverse /images balancer://jon/images

                  ProxyPass /rhq balancer://jon/rhq

                  ProxyPassReverse /rhq balancer://jon/rhq

                  ProxyPass /coregui balancer://jon/coregui

                  ProxyPassReverse /coregui balancer://jon/coregui

                  ProxyPass /sessionAccess balancer://jon/sessionAccess

                  ProxyPassReverse /sessionAccess balancer://jon/sessionAccess

                  ProxyPass /j_security_check.do balancer://jon/j_security_check.do

                  ProxyPassReverse /j_security_check.do balancer://jon/j_security_check.do



                  At that point, I may as well setup a virtual host and pass / instead.


                  BTW, I was able to proxy behind a Location directive using mod_filter, mod_substitute, mod_rewrite and redirects, but the POST attempts would fail unless I used 307 redirect instead of 301. The 307 redirect caused the browser to prompt for confirmation on the redirect, as expected. Even with all that, which was kinda fun to figure out, there appears to be a fair bit of client side that is hard-coded. Yeah, yeah, I know you said that. So I said, meh for now.


                  I am not attempting to rewrite/rebase the /coregui and related URL behind a single webapp such as /rhq/coregui or /jon/coregui for the reason that is listed earlier in the thread.  I am proxying behind https.