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 ords-220.127.116.110.1456.zip -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.