9 Replies Latest reply on May 1, 2013 12:14 PM by Aaron.Gott

    ApEX and Oracle HTTP server

      Apex 4.2.1
      Oracle DB
      Oracle HTTP

      I'm trying to move away from the Apex Listener to the Oracle HTTP server with mod_plsql and I'm having an image problem after installing Oracle HTTP, copying the images and configuring the dads.conf.

      When I navigate to the new APEX URL (http://apexdev:7777/pls/apex/apex_admin) I get a blank screen. I've verified the images are in the path specified in the dads.conf. I also verified Oracle HTTP server was working by navigating to the Oracle Fusion Middleware frontend page successfully (http://apexdev:7777)

      The logs for Oracle HTTP (ohs1.log) clearly show that the problem is its looking in the wrong location for the images.

      Since the dads.conf file is pointing to the correct location how do I go about fixing this?

      Is there reference to this incorrect /i/ path in the db? How would I find it and remove it?

      Thanks in advance for any help you can provide.
        • 1. Re: ApEX and Oracle HTTP server
          Capt. Egg
          Perhaps there is a permission issue with the directory that's housing the images.

          What happens if you try to navigate directly to a file, such as a javascript, that stored in there via the browser? Do you get a 404 page or a Forbidden page? That'll give you a clue as to what's gone wrong.
          • 2. Re: ApEX and Oracle HTTP server
            Capt. Egg
            Another thing, on the blank screen in your browser, right click and select "view page source". You'll see in there what APEX thinks the images directory should be by looking at some of the paths. If it's not /i/, you can either add another alias in dads.conf or I think you need to run the apxldimg.sql script to change it (should be somewhere on the file system with the rest of the apex installation scripts).
            • 3. Re: ApEX and Oracle HTTP server
              I checked and permissions are not the problem. I also looked at the source and its looking for the images in /i/.

              The alias for /i/ in my dads.conf is:

              Alias    /i/    "/opt/oracle11/product/ofm/Oracle_WT1/ohs/images"

              The errors in the ohs1.log file are all similar to this:

              File does not exist: /opt/oracle11/apexlsnr/apex/imagesapex, referer: http://sand:7777/pls/apex/f?p=4550:10:12093999421665

              The path in the above ohs1.log error is the issue. For starters, its missing a / after directory images. If it was looking in /opt/oracle11/apexlsnr/apex/images/ I don't think I'd have this problem because this is the image location configured for my Apex Listener running in standalone mode. Secondly, the path in the ohs error log is not the path referenced in my dads.conf.

              I've tried changing my alias in dads.conf file to look in /opt/oracle11/apexlsnr/apex/images/ but because OHS is looking in /opt/oracle11/apexlsnr/apex/images (no backslash) its not working.

              I think the solution is to find and remove the invalid /i/ reference that points to the incorrect path /opt/oracle11/apexlsnr/apex/images

              Any ideas?

              Thanks Again.
              • 4. Re: ApEX and Oracle HTTP server
                I noticed that I messed up the path in my dads.conf file by not including a / after images.

                I've corrected the path so it now reads

                Alias /i/ "/opt/oracle11/product/ofm/Oracle_WT1/ohs/images/"

                I restarted OHS and retested unsuccessfully.

                The ohs1.log still shows OHS looking for images in "/opt/oracle11/apexlsnr/apex/images".
                • 5. Re: ApEX and Oracle HTTP server
                  Jeff E
                  Just of few thoughts:

                  -- Perhaps there is an alias line in http.conf that conflicts
                  -- After changing the dads.conf did you restart the HTTP server?
                  -- In the alias line make sure to include the forward slash at the end of the location specified.
                  • 6. Re: ApEX and Oracle HTTP server
                    I checked the httpd.conf file and there is no reference to /i/ location.

                    I updated dads.conf and restarted OHS and the DB. I still can't see any images and the image path in the ohs1.log file is still pointing to the incorrect location.

                    Any other thoughts?
                    • 7. Re: ApEX and Oracle HTTP server
                      Jeff E
                      I know you mentioned that you ran the apex listener standalone but maybe at some point it was installed with the weblogic server and there is an deployment causing the conflict. I'm not very familiar with the listener and the weblogic server so I'm just throwing it out there.

                      • 8. Re: ApEX and Oracle HTTP server
                        Capt. Egg
                        I'm sure you've probably already confirmed this stuff, but just to mention it, when you are restarting the oracle http server, double check that ORACLE_HOME is actually set to your OHS path before using opmnctl to restart it. If you are only restarting the HTTP_Server component, perhaps try opmnctl stopall followed by a opmnctl startall.

                        If you still have no luck, and this is a linux server try grep -r "/i/" * in the directory or perhaps you have to escape those slashes. Try this command from the following directories:
                        * $ORACLE_HOME/Apache/Apache/conf or $ORACLE_HOME/ohs/conf (depending on the OHS version)
                        * $ORACLE_HOME/Apache/modplsql/conf or $ORACLE_HOME/ohs/modplsql/conf

                        Those paths are for OHS and, I just noticed you are using a newer version I've not had any experience with.

                        Edited by: Capt. Egg on 30/04/2013 16:42
                        • 9. Re: ApEX and Oracle HTTP server
                          PROBLEM SOLVED

                          I grep'd for pattern /opt/oracle11/apexlsnr/apex/images in all files in the OFM directory and found that there are multiple dads.conf & httpd.conf files.

                          When stumbling through oracles documentation I configured more than one dads.conf files. While troubleshooting my issue I focused on the wrong dads.conf file.

                          The path to the correct dads.conf file is


                          Note: After fixing the correct dads.conf file and restarting OHS I started receiving the following error in the OHS console log.

                          mod_plsql: DAD /pls/apex disabled => Duplicate DAD

                          While researching how to set this up I found reference that said to add the following lines to my httpd.conf file

                          LoadModule plsql_module "/opt/oracle11/product/ofm/Oracle_WT1/ohs/modules/mod_plsql.so"
                          include "/opt/oracle11/product/ofm/Oracle_WT1/instances/instance1/config/OHS/ohs1/mod_plsql/*.conf"

                          To fix the Duplicate DAD error I commented out the "include......../*.conf" from my httpd.conf file and restarted OHS.

                          I don't see any errors in the OHS console log anymore and now I can access my ApEX installation.

                          Thanks for everyones help.