Monday, December 23, 2019

Free Oracle Cloud: 17. Configure domain to redirect to APEX app

This post is part of a series of blog posts on the Best and Cheapest Oracle APEX hosting: Free Oracle Cloud.

In a previous blog post, we configured the webserver on our Compute VM Instance. We added a website and configured the domain dgielis.com to point to this instance.

I got many requests on how to point the domain name to a specific Oracle APEX app. This is what I will cover in this blog post.

Lets start with connecting to our VM:

From a Terminal connect to your Oracle Cloud VM:

ssh -i ssh_key opc@public_ip

The first thing we do, is changing to the root user, as we want to configure the web server. Alternatively in front of every command you can add sudo.

We logged in as the OPC user, to become the ROOT user we do:

sudo su

# open the configuration file we created in the previous blog post
vi /etc/nginx/conf.d/dgielis.com.conf

# add following
  location / {
    rewrite ^/$ /ords/f?p=101:LOGIN_DESKTOP:0 permanent;
  }

# save and quit (:wq)

My config file looks now like this:


# to test Nginx configuration
nginx -t 

# to restart Nginx
nginx -s reload

That's it.

5 comments:

Bertil Tandayamo said...

Hi, Dimitri.
I know is nothing about with this blog, but anyways
could you help me with something,
What kind of business/companies have oracle apex as software architecture?.
Does also big tech companies like Facebook, Google use in some transactions?
How come this?, Because I've seen a lot of job alerts coming just from India, or Egypt. countries who are in the process of development and nothing from Europe or the US.

Thank you in advance for your answer.

Cheers,
Bertil Tandayamo

Dimitri Gielis said...

Hi Bertil,

There are many big companies using Oracle APEX. Some in automotive are Volkswagen and BMW, some in Pharma are Davita and Merck, you have companies like Siemens in industry and Harvard University in Education. In technology, you have Oracle themselves. I'm unsure about Google and Facebook, I guess they use their own systems and not Oracle APEX.
But hopefully, you can see that Oracle APEX is used across many domains with many different (big) companies.

When you look at apex.world you find jobs in US and Europe too. In fact, Germany is one of the biggest markets for Oracle APEX.

Hope that helps,
Dimitri

Bertil Tandayamo said...

Hi Dimitri, thanks a lot yeah I was underrating Oracle Apex power. Thank you again for the feedback, Cheers.

juanjf9 said...

Hi Dimitri, I want to thank you again for these post, I beleive you have more documentation about Oracle cloud then Oracle itself hehe.

Quick question, do you know what changes needs to be done at conf file in order to redirect to different databases with the same domain?.

like: mydomain.com/prod/ords
mydomain.com/dev/ords

Regards.

sumko said...

Hi Dimitri, i really want to thank you for making this series, it is really helpfull. I was able to follow it, up to mapping to specific apex app. Even though i added rewrite command as you instructed in domaind.conf file it still opens index.html (ssl is also activated, did everything you did). Any idea on this or maybe it simply needs some time to redirect.

Thanks

BR,
Sumi