5 Replies Latest reply: Nov 8, 2012 10:38 AM by Mehabub Sheikh RSS

    Apex Listener with Glassfish behind Apache

    Mehabub Sheikh
      Hi,

      I installed Glassfish 3.1.2 Server Open Source Edition on Windows XP which is having 11G XE installed. Then installed APEX Listener 1.4.
      I installed Apache 2.2 and configured apache httpd.conf file and included mod_proxy
      LoadModule proxy_module modules/mod_proxy.so

      and added
      ProxyPass /apex/ http://localhost:8080/apex/
      ProxyPassReverse /apex/ http://localhost:8080/apex/

      where 8080 is the Glassfish HTTP port.

      Now if I type localhost/apex it throws error
      The requested URL /apex was not found on this server.

      For reference I followed
      https://kr.forums.oracle.com/forums/thread.jspa?threadID=2319268

      Am I missing anything?

      Thanks,
      Mehabub
        • 1. Re: Apex Listener with Glassfish behind Apache
          Mehabub Sheikh
          Just and update

          When I included all the proxy modules in httpd.conf it is now redirecting me to the log in page but not displaying images.
          In the apache server error log I could see the following error
          [Thu Nov 08 01:07:07 2012] [error] [client 127.0.0.1] File does not exist: C:/server/Apache/htdocs/i

          Now if I create a folder i under htdocs and copy the images there it is displaying log in screen and working fine.

          But I wanted to have a single place to store the images. So I added Alias
          Alias /i/ "C:/oracle/product/10.2.0/db/Apache/images/"
          But that is not working.

          Do I need to include any modules to use Alias in httpd.conf?

          Thanks,
          Mehabub
          • 2. Re: Apex Listener with Glassfish behind Apache
            Mehabub Sheikh
            After checking the apache log file I saw it is throwing following error message along with others
            client denied by server configuration: C:/oracle/product/10.2.0/db/Apache/images/css/apex_ui.min.css, referer: http://localhost/apex/f?p=4550:1:2266507103385
            The default apache installation was having Deny from all. So I changed it to
            <Directory C:\apex_4.2\apex\images/>
            Options FollowSymLinks
            AllowOverride None
            Order deny,allow
            </Directory>

            I changed the alias to point the directory.

            And it all started working. But I faced another issue with charts.
            I had Pie charts and bar charts but it is showing all bar charts and the charts data series seems to be same for all.
            Very interesting.

            Any clue why???

            Thanks,
            Mehabub
            • 3. Re: Apex Listener with Glassfish behind Apache
              Udo
              Possibly an issue with proper URL encoding. You could check by adding the nocanon option to your ProxyPass rule.

              Also, did you make sure your GlassFish is aware that it's running behind a proxy? Possibly not all of your clients requests are answered by your proxy, which can lead to XSS-issues.

              -Udo
              • 4. Re: Apex Listener with Glassfish behind Apache
                Mehabub Sheikh
                Thank you Udo for the response.
                Possibly an issue with proper URL encoding. You could check by adding the nocanon option to your ProxyPass rule.
                I am a novice in the apache world. Could you please provide me the syntax?
                Also, did you make sure your GlassFish is aware that it's running behind a proxy? Possibly not all of your clients requests are answered by your proxy, which can lead to XSS-issues.
                How will I do this?

                Thanks,
                Mehabub
                • 5. Re: Apex Listener with Glassfish behind Apache
                  Mehabub Sheikh
                  I have resolved the issue. By mistake I had put wwv_flow* in the cache section of APEX Listener configuration. I removed that and now everything is set.

                  Cheers,
                  Mehabub