Category Archives: OS & Web Servers

Choosing an APEX web server

There are three typical choices for an Oracle Application Express installation web servers : Oracle HTTP server with mod_plsql, Embedded PL/SQL Gateway (EPG) and the Oracle APEX Listener. Choosing one of these servers relates not only to features and performance, but also to the preferred technology stack. As EPG is an easy to configure lightweight server; it is not suited for enterprise applications or web application with heavy traffic. Oracle HTTP server might be the most common choice, but the APEX Listener is a Java 2EE alternative that might fit better into a Java technology stack.

Oracle HTTP server with mod_plsql

The Oracle HTTP server uses the mod_plsql extension to communicate with the Oracle database and with APEX. The server is delivered as a component of Oracle Fusion Middleware and is designed to serve both static and non-static web pages, acting as a HTTP listener for the Oracle Weblogic Server.

The Oracle HTTP Server is, in fact, an implementation of Apache HTTP server. Mod_plsql, as an extension, will provide HTTP generation from PL/SQL code, by mapping browser requests to database stored procedures.

A complete web request flow using this configuration is as follows:

Continue reading

Changing the PlsqlErrorStyle atttribute for EPG

I’ve been having some trouble with my Oracle XE + Apex 4.0 + EPG instance lately and the only way I could debug the error was by switching the way EPG produces the error messages in the web browser.

By default, EPG (Embedded PLSQL Gateway) outputs the web page rendering error messages in ApacheStyle, meaning that when a page results in error, the message displayed in the browser is similar to that output by an Apache HTTP Server (even if you’re not using one):

404 Not found

The requested URL was not found on this server

The way to change the error message style for EPG is by executing as SYS:

Continue reading


The Oracle XE database comes out-of-the box with the Embedded PLSQL Gateway (EPG), which is a robust web server. EPG is an embedded web server to run PLSQL application via mod_plsql. It's simple and straightforward when you are running APEX on an XE database, and you you know the basic DBMS_EPG API for adminstrating the Database Access Descriptors (DADs) for the XML DB HTTP. But practice revealed that EPG is limited and more often it best to put a Apache HTTP server "on top" of EPG, for extended features and simplicity.

Configure EPG DAD settings

By default, leave the EPG HTTP port to 8080. Check the current port by connecting to sqlplus as sys and execute: select DBMS_XDB.GETHTTPPORT() from dual;

At this point, you can access you application at:

The epg_dad value is automatically set during the APEX installation, and it's value is apex with the path /apex. So your application would be typically accessed from

Continue reading

Install Oracle XE on Linux Centos 5

This is a quick guide on how to install Oracle XE on a Linux Centos 5 machine:

Download Oracle XE from For Linux Centos release, you will download your desired .rpm file (Universal or Western European)

Copy you .rpm to the Linux machine, either using WinScp or setting up a FTP server.

Log in as root (or sudo as root) and change the folder where you copied your .rpm file.

Install the dependencies:

yum install libaio

yum install bc

Install Oracle XE:

rpm -ivh oracle-xe-

A successful installation will result in the following message:

Preparing… ########################################### [100%]
1:oracle-xe ########################################### [100%]
Executing Post-install steps…

You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database.

Continue reading

How to install OC4J server on Linux Centos

OC4J or Oracle Containers for J2EE is a complete J2EE compliant environment that provides all the containers, APIs, and services that enable a J2EE product to run. It is actually a robust and minimal distribution of Oracle Application Server, developed entirely in Java. More about OC4J you can read here: What is OC4J? One particular use for this web server is APEX print server. APEX usually allows only two possible configurations for the report printing server: standard (we will use OC4J) and advanced which requires Oracle BI. And Oracle BI costs "just" a few thousand dollars so… OC4J it is!

Prerequisites. Install Java2SE

We will demonstrate installing OC4J on a Linux Centos 5 machine.

Continue reading

Start Java program as Linux daemon

Use this script to run Java programs as daemons (services) on Linux Centos (or other Red Hat releases). This script originates from a script use to do the same thing in Linux Suse and was adapted for Centos by Joshua Davis. Save the code below in a sh file (Ex.:, set the variables at the beginning of the script. To start/stop the daemon using, just use:

./ start

./ stop

./ status

Continue reading

Configure APEX on port 80 when using EPG (Linux)

By default, Oracle XE comes with Embedded PLSQL Gateway (EPG) web server and the default port for APEX is 8080. To change that to port 80, use the following steps.

Step 1. Chage the owner of tnslsnr folder

As root, execute:

$ chown root:root $ORACLE_HOME/bin/tnslsnr


Step 2. Modify LISTENER.ORA

Add this to your LISTENER.ora (located in $ORACLE_HOME\NETWORK\ADMIN):

(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 80))

Continue reading