Discussions
Categories
- 196.7K All Categories
- 2.2K Data
- 235 Big Data Appliance
- 1.9K Data Science
- 449.8K Databases
- 221.5K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 549 MySQL Community Space
- 477 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3K ORDS, SODA & JSON in the Database
- 532 SQLcl
- 4K SQL Developer Data Modeler
- 186.8K SQL & PL/SQL
- 21.2K SQL Developer
- 295.4K Development
- 17 Developer Projects
- 138 Programming Languages
- 292.1K Development Tools
- 104 DevOps
- 3.1K QA/Testing
- 645.9K Java
- 27 Java Learning Subscription
- 37K Database Connectivity
- 153 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.1K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 17 Java Essentials
- 158 Java 8 Questions
- 85.9K Java Programming
- 79 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.2K Java SE
- 13.8K Java Security
- 203 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 392 LiveLabs
- 37 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.6K Other Languages
- 2.3K Chinese
- 170 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 230 Portuguese
ORDS 22.1 path mapping

Is there possibility in ORDS 22.1 configure paths for one pool so that it serves default path /ords and another path e.g. /ords/mypath?
In previous version this was possible using url-mapping.xml like
<pool-config xmlns="http://xmlns.oracle.com/apex/pool-config"> <pool name="my_db" base-path="/" /> <pool name="my_db" base-path="/mypath" /> </pool-config>
When using ORDS 22.1 and entering to pool paths file below lines, pool serves only default path /ords
/ /mypath
Best Answer
-
You can get it working the way you want by doing the following:
- Rename your pool folder
/databases/my_db
folder to default/databases/default.
This indicates that this pool will serve /ords/ requests. - Remove the '/' from the paths file, leave it with /mypath only, so it also serves /ords/mypath requests
/databases/default/paths
/mypath
3. Restart ORDS
- Rename your pool folder
Answers
-
Yes, add a file in your databases/pool directory called
hostnames (no file suffix, just literally, 'hostnames' and/or
paths
In those files, have on a single line, a comma delimited list of patterns or URLs
-
Thanks Jeff,
Maybe I misunderstand something. I did understand from document you point me that list of patterns should be separated by new line.
When I place below to file "../databases/my_db/paths"
/,/mypath
I get below error in Tomcat logs and ORDS not working
SEVERE [oracle.dbtools.common.logging.JDKLogSink record] Error parsing pattern, reason: Expected one of: <<literal>> but got: <<,>>
And if I place to same file
/ /mypath
ORDS is working but I get HTTP 404 error when try access APEX from url
https://127.0.0.1/ords/mypath/apex
I can access APEX from
https://127.0.0.1/ords/apex
In previous version both URLs did work using url-mapping.xml I showed in previous post
-
When you migrated, your mapping patterns should have come over for you, and your URLs/routes should have continued to work.
Are you saying this didn't happen? For an existing, working install of ORDS 21.4 - going to 22.1, those files and entries should be setup for you by the migrate/install process.
-
I didn't run migration. I did install ORDS 22.1 from scratch.
I can try migration, and see what it does.
Thanks.
-
It seems migration don't like my old ORDS url-mapping.xml
The url mapping for pool name my_db has an invalid base-path pattern: /
Full output
$ export ORDS_CONFIG=/tmp/ords_latest_config $ ./bin/ords migrate config /tmp/old_ords_config/ ORDS: Release 22.1 Production on Mon Apr 25 15:07:33 2022 Copyright (c) 2010, 2022, Oracle. Configuration: /tmp/ords_latest_config Oracle REST Data Services - Migrate Configuration Oracle REST Data Services 22.1.0.r1051723 - Migrate Configuration Migrating ORDS Configuration files located at /tmp/old_ords_config/ords File /tmp/old_ords_config/ords/standalone/standalone.properties does not exist. The global setting named: db.invalidPoolTimeout was set to: 5m The global setting named: plsql.gateway.mode was set to: proxied The global setting named: security.requestValidationFunction was set to: wwv_flow_epg_include_modules.authorize The setting named: db.username was set to: ORDS_PUBLIC_USER2 in configuration: my_db The setting named: db.wallet.zip.path was set to: /tmp/Wallet_MYDB.zip in configuration: my_db The setting named: db.wallet.zip.service was set to: mydb_low in configuration: my_db The setting named: jdbc.InactivityTimeout was set to: 120 in configuration: my_db The setting named: jdbc.InitialLimit was set to: 3 in configuration: my_db The setting named: jdbc.MaxLimit was set to: 5 in configuration: my_db The setting named: jdbc.MinLimit was set to: 0 in configuration: my_db The setting named: jdbc.statementTimeout was set to: 90 in configuration: my_db The url mapping for pool name my_db has an invalid base-path pattern: / Legacy configuration files located at /tmp/old_ords_config/ords are no longer being used to configure ORDS or its connection pools. Your migrated configuration files are now located at /tmp/ords_latest_config
-
What version of ORDS are you currently using?
What is your use case to have both / and /something_else mapped to the same database/pool/apex ?
Jeff
-
I have used long time and in many previous ORDS version that url-mapping.xml. Latest version where I used it was 21.4.2.062.1806.
Use case is host applications in URL
https://127.0.0.1/ords/
Web server adds HTTP header e.g. x-public_url when using that URL and I restrict access to APEX builder by that using APEX instance parameter RESTRICT_DEV_HEADER.
And have another URL where I can access to APEX builder, and web server don't set that HTTP header
https://127.0.0.1/ords/mysecreturlprefix/
And another use case is add some extra authentication in web server side to URL that can access to APEX builder
-
You can get it working the way you want by doing the following:
- Rename your pool folder
/databases/my_db
folder to default/databases/default.
This indicates that this pool will serve /ords/ requests. - Remove the '/' from the paths file, leave it with /mypath only, so it also serves /ords/mypath requests
/databases/default/paths
/mypath
3. Restart ORDS
- Rename your pool folder
-
Thank you. That works.