Getting 302 Response

Vivek Solanki vivek.solanki at einfochips.com
Mon Jun 17 23:24:17 UTC 2019


Hi Team,

I have a nginx configuration file in /etc/nginx/default.d directory. I am using dynamic upstream, but I am getting 302 response on my nginx server. Below is the upstream and rewrite rule details:

=====================================================
resolver 172.29.92.2  valid=60s;
set $upstream_endpoint https://abc.example.com/;

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

Requests will come like https://abc.example.com/media/movie/bollywood/action/wallpapar....

Please help me out in setting up proper rewrite rule.


Vivek Solanki

************************************************************************************************************************************************************* eInfochips Business Disclaimer: This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. Any views expressed in this message are those of the individual sender unless otherwise stated. Company has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email. *************************************************************************************************************************************************************


More information about the nginx mailing list