How to make Oracle HTTP Server (Apache or OHS) to talk to standalone OC4J.

  1. Changes to Apache configuration files:
    Make sure that mod_oc4j.conf is included in httpd.conf.
    Add the following to <Apache Install Dir>/conf/mod_oc4j.conf before <IfModule mod_oc4j.c>
    Oc4jMount /myapp/* ajp13://<oc4j_server>:8888
  2. Changes to OC4J configuration:
    Goto OC4J install directory: <install dir>/j2ee/home/config/http-web-site.xml

    Modify the tag:
    <web-site ...>
    to
    <web-site host="localhost" port="8888" protocol="ajp13" ...>
  3. Deploy your application on OC4J
    Deploy EAR
    java -jar path/to/oc4j/admin.jar \
      ormi://<oc4j_server>/          \
      admin passwd -deploy           \
      -file earfile.ear              \
      -deploymentName name_of_app
    
    Bind webapp
    java -jar path/to/oc4j/admin.jar \
      ormi://<oc4j_server>/          \
      admin passwd -bindWebApp       \
      name_of_app                    \
      <name_of_war_file_in_application.xml> \
      http-web-site /myapp
    
  4. Restart OC4J and OHS.
Back to root ....