Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Any NGINX reverse proxy experts on?

KeyserOct 21 2019 — edited Oct 21 2019

Hi,

I followed Dimitri Gielis blog posts to create a cloud compute instance, database and nginx web server (https://dgielis.blogspot.com/2019/09/best-and-cheapest-oracle-apex-hosting.html ). An excellent guide!

The NGINX web server now handles my old website correctly (http://goalstats.co.uk), I'm no longer using GoDaddy hosting, very happy with that!

I would like NGINX to reverse proxy to my new cloud Apex application.

With the configuration below, if I enter goalstats.co.uk/ords into the browser, it displays the first page of the app correctly and changes the URL to "https://www.goalstats.co.uk/ords/:1:108609103896722::::: " but if I click on a menu option I get "400 Bad Request" and the URL is changed to "https://www.goalstats.co.uk/ords/f?p=100:6:108609103896722::NO::: "

Interestingly, when I first initiate my app using goalstats.co.uk/ords, I get an error in the console "GET https://www.goalstats.co.uk/ords/wwv_flow.js_messages?p_app_id=100&p_lang=en&p_version=19.1.0.00.15-16241221904414 net::ERR_ABORTED 400 (Bad Request)" I don't know if this is causing the problem or if it's completely unrelated, is there any way to fix that?

You may notice in the .conf file below, I have commented out the "proxy_set_header Host $host;" line, if I uncomment that, I get "404 Not Found - The request could not be mapped to any database. Check the request URL is correct, and that URL to database mappings have been correctly configured"

I have tried doing a return 301 instead to do a redirect, this works but I would prefer to do a reverse proxy so I can keep my domain name in the URL.

Any help/advice gratefully receive

Thanks

Mark

pastedImage_4.png

This post has been answered by Natalie G on Oct 21 2019
Jump to Answer
Comments
Post Details
Added on Oct 21 2019
7 comments
2,213 views