Deploy ORDS on tomcat in a subdirectory

Usually ORDS is deployed on Tomcat simply as /ords, right?

What do you do, if you want a different name than ords, let’s say you would like to see “bruce” in the URL? Simple solution: just rename ords.war to bruce.war before deploying to Tomcat.

But what if you want to have “mod/plsql“, as in http://myserver.tld:8080/mod/plsql ?

There is a not so much known feature of tomcat coming to help: # (as in hashtag).

Here is a quick rundown:

  • unzip -d ords
    extract the ords-zip to directory ords
  • cd ords
    change into directory ords
  • cp ords.war mod#plsql.war
    copy the ords.war to mod#plsql.war
  • java -jar mod#plsql.war configdir /etc
    set the config directory
  • java -jar mod#plsql.war install simple
    set ords up, please refer to the docs or Tim Hall
  • mkdir /etc/mod
    setting up ords created a new directory with name “mod#plsql”, we actually need a directory structure “mod/plsql” so create a new directory “mod”…
  • mv /etc/mod#plsql/ /etc/mod/plsql
    …and copy+rename mod#plsql as plsql into the new mod directory
  • cp mod#plsql.war /var/lib/tomcat/webapps/
    now copy the war file to tomcat webapps folder
  • systemctl start tomcat
    and start tomcat

Now ORDS is deployed as http://localhost:8080/mod/plsl

Hope this helps! I didn’t know of the tomcat-hashtag trick before and like it a lot!

Next post will be about a proper reverse proxy setup with ORDS and APEX, which makes this post obsolete again.

Disclaimer: above commands are just examples and worked in my environment. Since your environment will look different (and you don’t know mine), you shouldn’t just copy/paste commands. Try to understand and adapt to your situation. Thank you.

3 thoughts on “Deploy ORDS on tomcat in a subdirectory

  1. Hi Peter,
    May be it is too early to ask, do we need to deploy images as “i” in the tomcat as web apps or we can create an alias in the Apache reverse proxy.


  2. Omar, what’s about my long experience with it. It would be much better to let Apache works with static part of APEX, and ORDS does with dynamic one. So Your second case is better.

Leave a Reply

Your email address will not be published. Required fields are marked *