Welcome! Log In Create A New Profile

Advanced

Getting 302 Response

June 17, 2019 07:26PM
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 ac
cepts no liability for any damage caused by any virus transmitted by this email. *************************************************************************************************************************************************************
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Getting 302 Response

Vivek Solanki June 17, 2019 07:26PM

Re: Getting 302 Response

Francis Daly June 18, 2019 11:28AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 171
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready