Welcome! Log In Create A New Profile

Advanced

Re: location + proxy pass = 404

June 19, 2020 02:37AM
Всем спасибо.

В итоге сделал такой конфиг

...
map $request_uri $topdir {
~(?<captured_topdir>^/[a-zA-Z0-9]+[/]) $captured_topdir;
}
...

server {
listen 80;
server_name _;

proxy_set_header Accept-Encoding "gzip,deflate";
proxy_set_header Connection "upgrade";
proxy_set_header Upgrade $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;

gzip off;
gunzip on;

location /test/ {
proxy_pass https://some_service/;

sub_filter "'/" "'$topdir";
sub_filter '"/' '"$topdir';
sub_filter_once off;
}
...
Subject Author Posted

Re: location + proxy pass = 404

imsystem June 17, 2020 03:32AM

Re: location + proxy pass = 404

emejibka June 17, 2020 06:35AM

Re: location + proxy pass = 404

imsystem June 17, 2020 06:44AM

Re: location + proxy pass = 404

Илья Шипицин June 17, 2020 08:34AM

Re: location + proxy pass = 404

Evgeniy Berdnikov June 17, 2020 08:28AM

Re: location + proxy pass = 404

Илья Шипицин June 17, 2020 08:32AM

Re: location + proxy pass = 404

emejibka June 17, 2020 12:53PM

Re: location + proxy pass = 404

Илья Шипицин June 17, 2020 01:04PM

Re: location + proxy pass = 404

emejibka June 19, 2020 02:37AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 59
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