A.4 Configuring the Embedded PL/SQL Gateway
To configure the embedded PL/SQL gateway, you run a configuration script and unlock the ANONYMOUS
account.
The embedded PL/SQL gateway installs with the Oracle Database 11g and later. However, you must configure it before you can use it with Oracle Application Express. To configure the embedded PL/SQL gateway, you run a configuration script and unlock the ANONYMOUS
account.
Note:
The Oracle XML DB Protocol Server with the Embedded PL/SQL Gateway is not supported before Oracle Database 11g.
- Running the apex_epg_config.sql Configuration Script
Run theapex_epg_config.sql
script. Then, unlock theANONYMOUS
account. - Updating the Images Directory When Upgrading from a Previous Release
Run theapex_epg_config.sql
script to update theimages
directory. - Verifying the Port Assigned to HTTP on the Oracle XML DB HTTP Server
Start SQL* Plus and connect to the database and enter the statement to verify the port number assigned to HTTP on the Oracle XML DB HTTP Server. - Verifying the Oracle XML DB Protocol Server Port
Start SQL* Plus and connect to the database and enter the statement to verify the port number where the Oracle XML DB Protocol Server is running. - Enabling Oracle XML DB Protocol Server
Start SQL* Plus and connect to the database and run a SQL statement to enable Oracle XML DB Protocol Server. - Configuring Static File Support
For configuring static files, you must runapex_rest_config.sql
after a new installation or upgrade of Oracle Application Express. - About Configuring Embedded PL/SQL Gateway Behind a Reverse Proxy or Load Balancer
Start SQL*Plus and connect to the database where Oracle Application Express is installed asSYS
specifying theSYSDBA
role. Execute the PL/SQL block.
See Also:
A.4.1 Running the apex_epg_config.sql Configuration Script
Run the apex_epg_config.sql
script. Then, unlock the ANONYMOUS
account.
You configure the embedded PL/SQL gateway by running the configuration script apex_epg_config.sql
. Then, you unlock the ANONYMOUS
account.
To run the apex_epg_config.sql
configuration script:
WARNING:
This script has to be executed only on the database server . It's not possible to perform a remote connect to the database server. The database server should have access to the specified directory. It's also not possible to map a network directory.
Parent topic: Configuring the Embedded PL/SQL Gateway
A.4.2 Updating the Images Directory When Upgrading from a Previous Release
Run the apex_epg_config.sql
script to update the images
directory.
If you are upgrading Oracle Application Express from a previous release, you must run the apex_epg_config.sql
script to update the images
directory.
Tip:
If this is a new installation, this step is unnecessary. The images will be loaded by running apex_epg_config.sql
as described in the prior section.
To run the apex_epg_config.sql
script:
Parent topic: Configuring the Embedded PL/SQL Gateway
A.4.3 Verifying the Port Assigned to HTTP on the Oracle XML DB HTTP Server
Start SQL* Plus and connect to the database and enter the statement to verify the port number assigned to HTTP on the Oracle XML DB HTTP Server.
The embedded PL/SQL gateway runs in the Oracle XML DB Protocol Server in the Oracle database.
To verify the port number assigned to HTTP on the Oracle XML DB HTTP Server:
Parent topic: Configuring the Embedded PL/SQL Gateway
A.4.4 Verifying the Oracle XML DB Protocol Server Port
Start SQL* Plus and connect to the database and enter the statement to verify the port number where the Oracle XML DB Protocol Server is running.
The Embedded PL/SQL Gateway runs in the Oracle XML DB Protocol Server in the Oracle database. You can determine if the Oracle XML DB Protocol Server is enabled by verifying the associated port number.
To verify the port number where the Oracle XML DB Protocol Server is running:
See Also:
Parent topic: Configuring the Embedded PL/SQL Gateway
A.4.5 Enabling Oracle XML DB Protocol Server
Start SQL* Plus and connect to the database and run a SQL statement to enable Oracle XML DB Protocol Server.
The embedded PL/SQL gateway runs in the Oracle XML DB Protocol Server in the Oracle database.
To enable Oracle XML DB Protocol Server:
Note:
Port numbers less than 1024 are reserved for use by privileged processes on many operating systems. To enable the XML DB HTTP listener on a port less than 1024, such as 80, review the documentation.
See Also:
-
"Using Protocols to Access the Repository" in Oracle XML DB Developer’s Guide.
-
"Protocol Address Configuration and Port Number Limitations " inOracle Database Net Services Reference .
Parent topic: Configuring the Embedded PL/SQL Gateway
A.4.6 Configuring Static File Support
For configuring static files, you must run apex_rest_config.sql
after a new installation or upgrade of Oracle Application Express.
Oracle Application Express enables application developers to include static files with their applications. Static files can be associated with a workspace, an application, a plug-in, or an application theme. When using the embedded PL/SQL gateway as your web listener, the necessary configuration to support static files is performed as part of the embedded PL/SQL gateway configuration.
See Also:
-
For new installations, see "Running the apex_epg_config.sql Configuration Script"
-
For upgrade installations, see "Updating the Images Directory When Upgrading from a Previous Release"
Parent topic: Configuring the Embedded PL/SQL Gateway
A.4.7 About Configuring Embedded PL/SQL Gateway Behind a Reverse Proxy or Load Balancer
Start SQL*Plus and connect to the database where Oracle Application Express is installed as SYS
specifying the SYSDBA
role. Execute the PL/SQL block.
If Oracle Application Express is running behind a reverse proxy or load balancer, you set the CGI environment variables PROTOCOL
and HTTP_HOST
. For embedded PL/SQL gateway, you must call the following PL/SQL block:
-
Change your working directory to the
apex
directory where you unzipped the installation software. -
Start SQL*Plus and connect to the database where Oracle Application Express is installed as
SYS
specifying theSYSDBA
role. For example:-
On Windows:
SYSTEM_DRIVE:\ sqlplus /nolog SQL> CONNECT SYS as SYSDBA Enter password: SYS_password
-
On UNIX and Linux:
$ sqlplus /nolog SQL> CONNECT SYS as SYSDBA Enter password: SYS_password
-
-
Execute the following PL/SQL block:
BEGIN DBMS_EPG.set_dad_attribute ( dad_name => 'APEX', attr_name => 'cgi-environment-list', attr_value => 'REQUEST_PROTOCOL=https'); DBMS_EPG.set_dad_attribute ( dad_name => 'APEX', attr_name => 'cgi-environment-list', attr_value => 'HTTP_HOST=external-name:external-port'); commit; END; /
To learn more, see your Java EE application servers documentation.
Parent topic: Configuring the Embedded PL/SQL Gateway