How to bind a OC4J Application to a Virtual Host

Posted by Dirk Nachbar on Sunday, June 22, 2008 with 1 comment
During a review of a customer Oracle Application Server environment the question came up, if it is possible to bind a specfic OC4J Application to a defined Virtual Host?

Since Oracle AS 10.1.3.x the OC4JMount is by default configured dynamically, you'll not find any entries in the Oracle HTTP Server configuration file mod_oc4j.conf. The solution is nevertheless simple to bind a OC4J Application to a Virtual Host.

Let's say, we have a Virtual Host definition in our httpd.conf for a Virtual Host listening on Port 8000 with the servername Over this virtual host our OC4J Application hrapp should be reachable, so we have to switch the Oc4jRoutingMode to static and turn the Oc4jMountCopy to off. After we can create the Oc4jMount Options to our hrapp.

Listen 8000
NameVirtualHost *:8000
Oc4jRoutingMode Static
<VirtualHost *:8000 >
Oc4jMountCopy off
Oc4jMount /hrapp OC4J_HRAPP
Oc4jMount /hrapp/* OC4J_HRAPP
</VirtualHost >

Thats all :-)