Sunday, 18 April 2021

Configure apex 5 and deploy on OHS 11g

 

Configure apex 5 and deploy on OHS<11g>

**Applicable from OHS 11g till OHS 12.13

 

11 .Install & configure database

Db details

                Hostname                  :               localhost / wlstest

                DB Name                  :               db12c

                DB port                     :               1521

                Character set             :               AL32UTF8

 

22 .Configure Apex5

 

Download Apex 5 from https://www.oracle.com/tools/downloads/apex-v51-downloads.html

             Cd c:\Oracle\apex\apex
                Sqlplus / as sysdba
                SQL > @apex_ins.sql sysaux sysaux temp /i/
                SQL > @apxchpwd.sql  
                                                                < admin / Oracle#123 >
                SQL > @apex_rest_config
                                                                < apex_public_user / Oracle#123 >
               
                SQL > @apex_epg_config.sql c:\Oracle\apex
                                < Deprecated in newer versions >

        

 

33 .Install & Configure OHS11 < 11.1.1.9.0>

 Download the media from

https://www.oracle.com/middleware/technologies/webtier-downloads.html#server19

 

Unzip the media to a temporary location


 

Goto Disk1 à execute setup.exe as administrator





 














Now we will configure OHS domain.

The Location of config.cmd differs from the 12c version. We will use config.cmd from ORACLE_HOME/bin location













       SAVE the response file to track the URL’s




Start OHS Services:-




Some opmn commands

è Opmnctl startall

è Opmnctl stopall

è Opmnctl startproc ias-component=ohs1

è Opmnctl stopproc ias-component=ohs1

è Opmnctl restartproc ias-component=ohs1

 Default  OHS URL: http://wlstest:7777



44 .Deploy Apex on OHS

 Database Changes

Sqlplus / as sysdba

SQL> alter user apex_public_user identified by Orcale#123 account unlock;

SQL> alter profile default limit password_life_time unlimited;

 UPDATING dads.conf

 We will be updating dads.conf file to connect APEX & OHS



Backup dads.conf file and add following entry into the file

<Location /apex>
Order deny,allow
PlsqlDocumentPath docs
AllowOverride None
PlsqlDocumentProcedure wwv_flow_file_mgr.process_download
PlsqlDatabaseConnectString localhost:1521:db12c
PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8
PlsqlAuthenticationMode Basic
SetHandler pls_handler
PlsqlDocumentTablename wwv_flow_file_objects$
PlsqlDatabaseUsername APEX_PUBLIC_USER
PlsqlDefaultPage apex
PlsqlDatabasePassword Oracle#123
PlsqlRequestValidationFunction wwv_flow_epg_include_modules.authorize
PlsqlPathAlias i
PlsqlPathAliasProcedure wwv_flow.resolve_friendly_url
Allow from all
</Location>



Configure Apex Images for OHS

                                Step 1:  Copy images from apex_home to OHS directory

APEX_HOME\images to C:\Oracle\OHS11g\Middleware\Oracle_WT1\instances\instance1\config\OHS\ohs1\htdocs\

                                Step 2: Make an alias for apex images in OHS

                Add the following entry into dads.conf file

                Alias /i/ "C:\Oracle/OHS11g/Middleware/Oracle_WT1/instances/instance1/config/OHS/ohs1/htdocs/images/"

                **Careful with the “\” & “/” in the above syntax. Use the format mentioned above

 


So final dads.conf file should look like this:

           

Alias /i/ "C:\Oracle/OHS11g/Middleware/Oracle_WT1/instances/instance1/config/OHS/ohs1/htdocs/images/"
 
<Location /apex>
Order deny,allow
PlsqlDocumentPath docs
AllowOverride None
PlsqlDocumentProcedure wwv_flow_file_mgr.process_download
PlsqlDatabaseConnectString localhost:1521:db12c
PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8
PlsqlAuthenticationMode Basic
SetHandler pls_handler
PlsqlDocumentTablename wwv_flow_file_objects$
PlsqlDatabaseUsername APEX_PUBLIC_USER
PlsqlDefaultPage apex
PlsqlDatabasePassword Oracle#123
PlsqlRequestValidationFunction wwv_flow_epg_include_modules.authorize
PlsqlPathAlias i
PlsqlPathAliasProcedure wwv_flow.resolve_friendly_url
Allow from all
</Location>

 

Once above changes are done, restart OHS to take effect


 

Now try the URL: http://wlstest:7777/apex


After troubleshooting I found I had issues in database connectivity and user account APEX_PUBLIC_USER. Once that was fixed and OHS needed 1 more restart.

http://wlstest:7777/apex

 *Faced Similar issue on APEX5 running on Oracle Database 12.2

Solution:- 

After reviewing the logfiles of OHS traced an error

Error "MODPLSQL-000058: mod_plsql: HTTP-503 ORA-28040 ORA-28040: No Matching Authentication Protocol" Accessing ModPlsql Application

 In the sqlnet.ora file add the following to the file and save it.
SQLNET.ALLOWED_LOGON_VERSION=8

Restart the Database server and it is good perform restart of OHS also 
Retest the connection again and now see that it is successful.


 



 

http://wlstest:7777/apex/apex_admin


 


 

Thank You!

 

No comments:

Post a Comment