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
17
Feb

Changing the APEX http port with apache

Written by Richard Weug. Posted in Installation

After you have installedAPEX on your database with Oracle http webserver / Apache as webserver, your APEX installation will be accesible from port 7777 by default. As this is not the standard http port, you might want to change that to 80, which is.

Locate the file httpd.conf in your apache installation (<ORACLE_HOME>/APACHE/CONF). Search for the text:

#Listen 3000

#Listen 12.34.56.78:80
 
After this text, insert the following:
 
Port 80

Listen 80
 

This will tell apache to allow access from port 80. Obviously, you can change this to whatever you like. After restarting the http server, APEX will be running on port 80. Most applications will run fine, unless you hard-coded the server address with port number, which is bad practise anyway. But we are not done yet, the flash graphs are not working. The flash graphs will fetch a XML file upon load, which is no longer possible. This is because flash is restricted to get data from the same domain by default, and also the port number as it seems. So if your website is running on http://mydomain.com:80 and flash ios looking for a file on http://mydomain.com:7777, it will fail.

So why is flash getting the wrong location? APEX uses the CGI variable SERVER_PORT for this. Weirdly enough, APEX is ignoring the SERVER_NAME variable. To configure these variables, locate dads.conf (<ORACLE_HOME>/APACHE/MODPLSQL/CONF). This file configures the pl/sql gateway. Add these lines to the file, between the <location ... </location> tag:

PlsqlCGIEnvironmentList SERVER_PORT=80

PlsqlCGIEnvironmentList SERVER_NAME=<mydomain.com>

Original article written by Bart Meijer: link: http://www.bnhmeijer.nl/node/70