Changing Webserver

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/

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 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 – 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:

…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”

  • I try to setup exactly but im gintetg below User credentials doesn’t match the existing ones at oracle.jdbc.pool.OracleImplicitConnectionCache.validateUser( at oracle.jdbc.pool.OracleImplicitConnectionCache.defaultUserPrePopulateCache( at oracle.jdbc.pool.OracleImplicitConnectionCache.( at oracle.jdbc.pool.OracleConnectionCacheManager.createCache( at oracle.jdbc.pool.OracleDataSource.cacheInitialize( at oracle.jdbc.pool.OracleDataSource.getConnection( at oracle.jdbc.pool.OracleDataSource.getConnection( at oracle.jdbc.pool.OracleDataSource.getConnection( at org.apache.jsp.Testfanpool_jsp._jspService( help in this will be greatly appreciated.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>