An APEX Vanity URL for Oracle Managed ORDS for Private Endpoint ADB on OCI

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

  1. You have created a new VCN with public and private subnets by following this guide

  2. 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.

  1. 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

  1. Follow this blog to install Nginx Proxy Manager as a docker container

  2. Once installed, configure Nginx Proxy Manager like this.

    Where it says 13.37.13.37, use your ADBs IP instead

  3. In SSL, select your Certificate

  4. 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

  1. 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!