APEXblog.nl - Tips and Tricks

About This Blog:
I (Richard Weug) started this blog primary for myself to save all kinds of Apex tips and tricks in one place. To use it as a place to write down how I used some coding in my own projects, but also to copy and paste all kinds of articles I find on the Internet. (So I never have to wonder on what website did I read about??? When I see something interesting I collect the content so I have my own archive/knowlegde base.

View my profile on LinkedIn

 

Installation & Configuration

Print
24
May

Change webserver (EPG)

Written by Richard Weug. Posted in Installation

The original article is written by Teun Luijbregts | http://blog.warp11.nl/2011/05/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/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

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

## 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.

Original article is written by: Teun Luijbregts
Link to article:    http://blog.warp11.nl/2011/05/changing-webserver/

Check out more interesting articles on blog.warp11.nl for example these articles:  http://blog.warp11.nl/2011/05/