Getting 302 Response

Francis Daly francis at
Tue Jun 18 15:26:22 UTC 2019

On Mon, Jun 17, 2019 at 11:24:17PM +0000, Vivek Solanki wrote:

Hi there,

>  location /media {
>  rewrite ?/media(.*) /$1 break;
>  proxy_pass $upstream_endpoint/media;
>  }

> Requests will come like
> Please help me out in setting up proper rewrite rule.

Why do you want a rewrite rule?

It is not clear to me what you are trying to achieve.

Can you give one example of a request that you will make of nginx, and
the matching request that you want nginx to make of the upstream server?

Perhaps that will make it clearer what configuration is appropriate.


Francis Daly        francis at

More information about the nginx mailing list