Sunday, November 23, 2008

Configuring Oracle APEX on Port 80 (with Embedded PL/SQL Gateway) in XE database

You can use the following instructions to configure Oracle APEX on Port 80 in Oracle XE database. The default port is port 8080 but if you want it change to port 80 instead use the following steps.

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 port 80 your DBA must do the following:

1. (UNIX only) Use this shell command to ensure that the owner and group of executable file tnslsnr are root

$ chown root:root $ORACLE_HOME/bin/tnslsnr

2. (UNIX only) Add the following entry to the listener file, LISTENER.ora, where hostname is your host name.

(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 80))
(PROTOCOL_STACK = (PRESENTATION = HTTP) (SESSION = RAW))
)

3. (UNIX only) Stop, then restart the listener, using the following shell commands, where user_id and group_id are your UNIX user and group identifiers, respectively:

$ lsnrctl stop
$ tnslsnr LISTENER -user user_id -group group_id &


Use the ampersand (&), to execute the second command in the background. Do not use lsnrctl start to start the listener.

4. Use PL/SQL procedure DBMS_XDB.sethtpport with SYS as SYSDBA to setthe HTTP port number to 80 in the Oracle XML DB configurationfile /xdbconfig.xml.

SQL> exec DBMS_XDB.setHTTPPort(80);

5. Force the database to reregister with the listener, using this SQL statement:

SQL> alter system register;

6. Check that the listener is correctly configured:

$ lsnrctl status

7. Access Oracle APEX by giving the following URL. You do not need to specify the port number explicitly as port 80 is the default port.

http://hostname/apex

0 comments: