2

I'd like to hide one word in url of web-service. This word related to Oracle ApEx 5.0. I'm using Nginx v1.8.1. My current Nginx-config is:

server {
    listen 80;
    server_name example.com;
    rewrite ^(.*) https://$server_name$1 permanent;
    }
server {
listen 443 ssl spdy;
server_name example.com;

.... ssl-confgiguration here....

location / {
    proxy_pass http://127.0.0.1:8080;
    proxy_set_header Host $host;
    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 https;
}
location ~ ^/app$ {
    return 301 https://$server_name/apex/f?p=101;
}

So, this config give me the following: when user goes to

http://example.com/app 

his request redirected to

https://example.com/apex/f?p=101 

Everything is ok, except word "apex" in URL...

Is it possible to create this configuration: user goes to

http://example.com/app

and user can see in browser's address string only

https://example.com/f?p=101

I think, that rewrite-rule is needed, but I tried many configurations without success.

Cristian_I
  • 1,585
  • 1
  • 12
  • 17
Tom Ozx
  • 41
  • 1
  • 4
  • Have not been able to do this either see a similar one here where I have put a bounty on it https://stackoverflow.com/questions/50848233/proxy-pass-ignoring-port Did you ever work out how? – AndrewT Jun 19 '18 at 08:26
  • What http listener are you using ? – Kris Rice Jun 25 '18 at 03:59

0 Answers0