EPG Embbeded PL/SQL Gateway
This option is the default installation option on Oracle XE and Oracle 11g database. It replaces the use of the OHS (Oracle HTTP Server).
Unlike the OHS, which we need to install and configure manually, the EPG is installed by default as part of the installation process of Oracle XE and Oracle 11g, and all we need to do to complete the installation process is to run a SQL script that is provided to us with the APEX distribution file. The process is very well documented in the APEX installation guide.
The EPG is also using an alias - /i/
by default that points to the images
directory; only this time we are not talking about an OS filesystem directory. All the files in the images
directory are uploaded into the database (into the XDB that hosts the EPG) in a manner that mimics the hierarchical structure of the images
directory. You can see the files with any Web browser that supports WebDAV (an extension to the HTTP protocol) and most of the modern Web browsers are. Using a similar URL to the following should display the files:
http://127.0.0.1:8080/i
Enabling FTP on EPG
If you want to manipulate the images
directory files that were uploaded to the XDB or add files of your own (like CSS or JavaScript external files), you can use an FTP client. However, you should first enable the proper port in the EPG. The default FTP port is 21
, and to enable it, you can use the following from SQL*Plus (connected as "SYS as SYSDBA"):
exec dbms_xdb.setftpport(21);
To verify the setting you can use:
select dbms_xdb.getftpport from dual;
Enabling remote access to EPG
By default, the access to the EPG is restricted to the local machine. If you want to enable remote access, you can use the following from SQL*Plus (connected as "SYS as SYSDBA"):
exec dbms_xdb.setlistenerlocalaccess(FALSE);
EPG versus OHS
EPG is only (officially) supported on Oracle XE and Oracle 11g database. There are some hacks that allow the use of EPG on a 10g database, but they are not recommended.
It can be very simple and comfortable to use EPG on the supported platforms, but experience shows us that, performance wise, it is slower than the OHS. As such, we recommend using it only for the development environment.
Note
The APEX license agreement stipulates that you can use the OHS, free of charge, as long as you are installing it on the same server as your APEX instance. In most cases, it should be good enough to serves the APEX needs.