Thanks to OTN

I actually had the same problem: I have one oracle instance (11gXE2) with Glassfish and the APEX Listener. I’m hosting different applications (in different workspaces) on this instance. The whole configuration is accessible by one fixed IP adres from the internet. I further have several domains (and sub-domains) mapped to this one IP. To ensure that a request for is routed to Application1 and to Application2 I wrote a smal plsql-“proxy (or multiplexer) using the OWA_UTIL.get_cgi_env (‘HOST’) variable to determine the requested domain and then redirect to an application that belongs to it.
The configuration I have stored in a table, for matching I use LIKE patterns:
Table for my “proxy”:


filling for your example:

ID SEQ HOST_PATTERN REDIR_URL -- --- ------------ --------------------------------------- 1 5 3 10 2 15 ... 0 99 % 

and the actual procedure to redirect calls:

PROCEDURE redirect IS t_host varchar2 (250); t_redir varchar2 (250); BEGIN t_host := OWA_UTIL.get_cgi_env ('host');   SELECT redir_url INTO t_redir FROM (SELECT redir_url FROM proxy_rules WHERE UPPER (t_host) LIKE UPPER (host_pattern) ORDER BY seq, id) WHERE ROWNUM < 2;   OWA_UTIL.redirect_url (curl => t_redir, bclose_header => TRUE); EXCEPTION WHEN OTHERS THEN OWA_UTIL.redirect_url (curl => '', bclose_header => TRUE); END redirect; 

Grant execute on this procedure to the APEX_PUBLIC_USER, create a public synonym on it and

make sure all requests without a path get redirected to it, for example with a simple index.html containing a redirect to “/apex/redirect”:

<meta http-equiv=”refresh” content=”0; url=/apex/redirect”>

This works fine, but doesn’t check that App2 is accessed through I still have to add this functionality.

I’m using the method on my sites,,, and Try it!

I hope this helps.

Christian Rokitta


Hi JeanParis,

You can use WebLogic as a web server, but unlike Apache where you place a html file to the www directory and you can see it immediately, in WebLogic you have to deploy it to a domain.

1. The html file must be in a directory of your choice (i.e. C:testhtml).

2. On that directory create a WEB-INF directory (from the example of step 1 it would be C:testhtmlWEB-INF).

3. In the WEB-INF directory create a file called web.xml with the following content:
<?xml version=”1.0″ encoding=”UTF-8″?>
“-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN”

4. Login to the WebLogic Console to deploy the application:

5. Click on Deployments.

6. Click Install and set the path to the directory of step 3 (if the directory only contains the html file and the WEB-INF subdirectory you will see no files to select, but the Next button will be enabled anyway).

7. Leave default “Install this deployment as an application” and click Next.

8. Select the servers you wish to deploy this.

9. Accept the defaults and click Finish.

10. Activate Changes if the message appears.

11. You should now be able to see the application started in the deployments screen.

12. You can now access your static content on the WebLogic Server port via the following URL:[your_html_file]



If you don’t want to change your “weblogic.xml” then Please login to admin console—
Servers—>YourManagedServerName(Click)—>Protocol (Tab)—>Http (Sub Tab)—>Default WebApp Context Root:

NOTE: In the above Field Please specify your WebApplications Context Root Preceding by forward slash (Example: /MyContextRoot)…so that after Server restart that Application will become your Servers Default WebApp….
For better results .. Please add the “welcome-page” inside your “web.xml” like following:
<?xml version=”1.0″ encoding=”UTF-8″?>
<web-app xmlns:xsi=”” xmlns=”” xmlns:web=”” xsi:schemaLocation=”” id=”WebApp_ID” version=”2.5″>