84
Views
2
Comments
[Reverse Proxy] Using nginx to translate https://myapp.com to https://OSserver/myapp

Hi.

I'm setting up a reverse proxy using nginx to translate:

https://pedrorito.av.it.pt

to

https://uda-dev.outsystemsenterprise.com/PedroRito

Here is my nginx config:

server {
server_name pedrorito.av.it.pt;

    location / {

        rewrite ^/(.*)$ /PedroRito/$1 break;

        proxy_pass https://uda-dev.outsystemsenterprise.com;
}

Still, it's not working properly, I get the message "There was an error processing your request."

You can test yourself.

Could you help me writing the right configuration for my use case?

Thank you.


UserImage.jpg
Pedro Rito

I now have it working with the following configuration:

server {
server_name pedrorito.av.it.pt;

    location / {

            rewrite ^/$ /PedroRito break;

            proxy_pass https://uda-dev.outsystemsenterprise.com/;

            proxy_set_header Host $host;

    }

}

However, the URL in the browser is https://pedrorito.av.it.pt/PedroRito/ and I would like to have only https://pedrorito.av.it.pt/ . Is it possible?

UserImage.jpg
Elfego Islas

Hi Pedro. Could you solve your issue? 

I'm having exactly the same issue, but we have our Apps in Outsystems, and using MS Azure Application Gateway as RP.

At the moment, it is working when I access https://app.domain.com/context but if I remove /context, I only get a blank page. I'm sure this is possible because in Test environment it works even without /context. The problem is in Prod env.

Thanks

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.