Welcome! Log In Create A New Profile

Advanced

basic rewrite question

October 18, 2017 11:39AM
I'm trying to setup rewrites so I can automate this more efficiently. Some of my locations require a rewrite and some do not. I currently have it hardcoded into the proxy_pass:

location ~* /v1/device/(.*)/ {
proxy_pass http://api.domain.com/api/v1.0/download/$1;
}


Would this accomplish the same thing?

location ~* /v1/device/(.*)/ {
rewrite ^/(.*) /api/v1.0/download/$1 break;
proxy_pass http://api.domain.com;
}
Subject Author Posted

basic rewrite question

halfpastjohn October 18, 2017 11:39AM

Re: basic rewrite question

halfpastjohn October 18, 2017 11:58AM

Re: basic rewrite question

halfpastjohn October 18, 2017 12:02PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 72
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready