0

I'm new to Nginx, I'm trying to do proxy_pass for a specific format of URL.

For example "http://example.com/sync/test" is the URL accessed by the user, internally the URL has to do proxy_passs to apache server like, "http://localhost:8000/test" need to exclude sync, but now it's` redirecting has "http://localhost:8000/sync/test".

Is there any option to split and get parameters after sync,

Suggestions or solution is appreciated

Boopaathy
  • 328
  • 4
  • 13

1 Answers1

1

Rewrite the url by removing /sync/ from the url

location / {
             rewrite ^/sync/(.*) /$1 break;
             proxy_pass http://localhost:8000;
           }
avck
  • 3,535
  • 3
  • 26
  • 38