Welcome! Log In Create A New Profile

Advanced

Setting up for Oracle Application Express (APEX)

Posted by philw 
Setting up for Oracle Application Express (APEX)
December 10, 2020 02:07PM
Hi all,

Would someone who knows nginx be able to help me please set up my server conf file so it works and hides my app URL and replaces it with the domain I have registered?

Many thanks in advance!

Phil



Current site URL: https://aqmrgdtevbjxsky-pprdb.adb.uk-london-1.oraclecloudapps.com/ords/r/dev/aussietennis/

I have a domain which is: aussietennis.club which formwards to a VM with nginx running on 140.238.84.46. This should then forward traffic to the above. In a perfect world, the above URL would look as https://aussietennis.club

When the site is navigated, all traffic should show URLS as follows: https://aussietennis.club/ords/r/dev/aussietennis/create-game?clear=10&session=107131688432281 etc etc

and not the following which is valid but is not using the domain I've got:
https://aqmrgdtevbjxsky-pprdb.adb.uk-london-1.oraclecloudapps.com/ords/r/dev/aussietennis/create-game?clear=10&session=107131688432281

My conf file is below:

server {
server_name aussietennis.club www.aussietennis.club;
root /usr/share/nginx/html/aussietennis.club;
index index.html;
try_files $uri /index.html;

listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/aussietennis.club/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/aussietennis.club/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

location /ords/r/ {

rewrite ^(/ords/r)/?$ $1/f?p=106;

proxy_pass https://aqmrgdtevbjxsky-pprdb.adb.uk-london-1.oraclecloudapps.com/ords/;
proxy_set_header Origin "" ;
proxy_set_header X-Forwarded-Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_connect_timeout 600;
proxy_send_timeout 600;
proxy_read_timeout 600;
send_timeout 600;
}

location /i/ {
proxy_pass https://aqmrgdtevbjxsky-pprdb.adb.uk-london-1.oraclecloudapps.com/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;
}
}


server {
if ($host = www.aussietennis.club) {
return 301 https://$host$request_uri;
} # managed by Certbot


if ($host = aussietennis.club) {
return 301 https://$host$request_uri;
} # managed by Certbot


listen 80;
listen [::]:80;
server_name aussietennis.club www.aussietennis.club;
return 404; # managed by Certbot
Re: Setting up for Oracle Application Express (APEX)
June 01, 2021 12:16AM
hi Phil, I'm trying to something very similar, but with a twist.
I have my own domain, say mytennisapp.ie.
I have an oracle cloud account and on one of the compute instances I have nginx and wordpress installed.
my domain a record points to this vm.
I have an apex app, 154, including a public page (40) for registration.
currently, mytennisapp.ie runs my wordpress site (which has a link to my app, a tennis event manager), and mytennisapp.ie/ords runs my tennis app by redirecting to mycloudurl/ords/f?p=154.

so far so good.

i'd like to achieve the following:
mytennisapp.ie/apex runs apex developer
mytennisapp.ie/events runs my app (instead of ../ords)
mytennisapp.ie/register runs my app landing on public page (f?p=154:40)

and retaining the mytennisapp.ie/* url rather than the ugly cloud url.
did you ever work out how to do that? and any advice on my redirect wishes greatly appreciated.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 249
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready