An APEX Vanity URL for Oracle Managed ORDS for Private Endpoint ADB on OCI
In this post, I'll walk through setting up a custom Vanity URL for an Oracle managed Oracle REST Data Services (ORDS) instance connected to an Autonomous Database (ADB) on Oracle Cloud Infrastructure (OCI)
Prerequisites
You have completed the following steps
You have created a new VCN with public and private subnets by following this guide
You have move the ADB to a Private End Point and have obtained a its Private IP by following this guide
In the steps below, we are trying to setup Nginx Proxy Manager to access the ADBs IP directly.
- Nginx Proxy Manager will be installed in the compute VCN, therefore ensure you have a Local Peering Gateway setup been the compute VCN and the VCN where ADB resides by following this guide
Steps
Follow this blog to install Nginx Proxy Manager as a docker container
Once installed, configure Nginx Proxy Manager like this.
Where it says 13.37.13.37, use your ADBs IP instead
In SSL, select your Certificate
Use this configuration in the Advanced Tab of NGINX proxy Manager
location /ords/ { proxy_pass https://your-adb-ip:443/ords/; proxy_set_header Origin ""; proxy_set_header X-Forwarded-Host $host:$server_port; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Host $host:$server_port; # Uncomment these if needed to rewrite the redirects properly # proxy_redirect https://example.com/ords/_/landing https://example.com/ords/r/wksp_x/custom-ords-landing/home; } location /i/ { proxy_pass https://your-adb-ip:443/i/; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host:$server_port; }
Where it says your-adb-ip use the ADB’s IP
Change example.com to your Domain name
Its a good idea to uncomment the line above to land on a specific page - take care to change example.com to your Domain name and point it at an Application that actually exists
Using NGINX instead? try adapt the above configuration using this guide
Test out your URL. Yours wont look like this, because I (cough\ ChatGPT*) created my own landing page (because I un-commented the lines above and created my own APEX Landing Application with no Authentication)
ENJOY!
What’s the picture? Typical Yorkshire scene in Spofforth. Visit Yorkshire!
Subscribe to my newsletter
Read articles from Matt Mulvaney directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Matt Mulvaney
Matt Mulvaney
With around 20 years on the job, Matt is one of the most experienced software developers at Pretius. He likes meeting new people, traveling to conferences, and working on different projects. He’s also a big sports fan (regularly watches Leeds United, Formula 1, and boxing), and not just as a spectator – he often starts his days on a mountain bike, to tune his mind.