Please imagine the following:
You started out with apex. And because it was the easiest installation scheme (apart from copying the ready-made virtual machine offered by Oracle free-of-charge ;-), you used the EPG-installation scenario.
Lets suppose that by now you have gained a bit of experience and you want to use a proper webserver to publish your newly gained expertise. At this moment the question becomes: how can I do this, without needing to reinstall all of APEX or even installing a whole new database?
This blog shows a quick way to ‘upgrade’ your installation to a webserver, using Tomcat 6 webserver (and Apache 4.0 and Oracle 11G database and Oracle Linux 6).

made new folder /app/apache/
## [as root] mkdir /app/apache/
## [as root] chown oracle:oracle /app/apache/

downloaded installation file apache-tomcat-6.0.32.tar.gz from Tomcat website and unzipped
## tar -xvfGW apache-tomcat-6.0.32.tar.gz

changed the port number from 8080 to 8082, as the 8080 port is already used by the dbconsole.
## open file /app/apache/conf/server.xml with an xml editor and Change all occurences of 8080 to 8082.

made a link to the startup shell script, located in /app/apache/tomcat/bin/startup.sh

moved all of the unzipped files to the /app/apache/webapps folder (you can extract the files here immediately, saves a bit of time).

Added following lines to file /app/apache/conf/tomcat-users.xml to allow Oracle to use the Tomcat server (you will need to add brackets for each line):
## <role rolename=”Manager”/>
## <role rolename=”Admin”/>
## <user username=”manager” password=”password” roles=”Manager”/>
## <user username=”admin” password=”password” roles=”Admin”/>
##

Copied the images directory from the apex location (see your apex installation logs!!) to the webapps folder and named the folder ‘i’. Then changed the access rights so that Oracle can actually approach and use the stylesheets and images.
## cp -r /app/oracle/product/apex/apex40/images /app/apache/tomcat/webapps/i
## chown oracle:oracle /app/apache/tomcat/webapps/i

Changed the portnumber used by Apex by using script apxconf.sql (Run this script as sysdba).

##[oracle@orasrv01 apex40]$ sqlplus sys as sysdba
##
##SQL*Plus: Release 11.2.0.1.0 Production on Fri May 13 10:09:37 2011
##
##Copyright (c) 1982, 2009, Oracle. All rights reserved.
##
##Connected to:
##Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 – Production
##With the Partitioning, OLAP, Data Mining and Real Application Testing options
##
##SQL> @apxconf.sql

Set http port used by xmldb to 8082.
##SQL> exec dbms_xdb.sethttpport(8082);

Test installation by starting up the Apex Administration site in your browser:
## http://orasrv01.oracle.com:8082/apex_admin

…If all went well then you should now be able to login as an admin user and create a new workspace in Apex.

2 thoughts on “Changing Webserver

  1. I try to setup exactly but im gintetg below exception.java.sql.SQLException: User credentials doesn’t match the existing ones at oracle.jdbc.pool.OracleImplicitConnectionCache.validateUser(OracleImplicitConnectionCache.java:296) at oracle.jdbc.pool.OracleImplicitConnectionCache.defaultUserPrePopulateCache(OracleImplicitConnectionCache.java:216) at oracle.jdbc.pool.OracleImplicitConnectionCache.(OracleImplicitConnectionCache.java:198) at oracle.jdbc.pool.OracleConnectionCacheManager.createCache(OracleConnectionCacheManager.java:298) at oracle.jdbc.pool.OracleDataSource.cacheInitialize(OracleDataSource.java:412) at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:393) at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:179) at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:157) at org.apache.jsp.Testfanpool_jsp._jspService(Testfanpool_jsp.java:73)any help in this will be greatly appreciated.

    Reply

Leave a Reply