Welcome! Log In Create A New Profile

Advanced

Nginx reverse proxy regex help

September 17, 2021 01:34AM
Hi Team,

I have server whose URL is https://xx.xx.xx.xx/TestPage/ which gets generated as

https://xxxx.xxx.xxx/TestPage/(S(0inoxzi14rxqq1uix1tiyp1t))/index.aspx

Now I have implemented nginx reverse proxy in front this server and then I have done the config proxy_pass as

proxy_pass https://xxx.ssss.sss.ss/TestPage;

Now if you see after TestPage there is a unique value gets added and then index.aspx however whenever request is passed through nginx I get 502 badgateway.

Wondering how do I pass that unique value through regex?

Please help

here is lcoation

location /TestPage {
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_send_timeout 90;
proxy_http_version 1.1;
proxy_read_timeout 90;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;
proxy_connect_timeout 30s;
proxy_pass https://xx.ss.xx.ss/TestPage;
proxy_redirect default;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
add_header X-Content-Type-Options nosniff;
add_header X-XSS-Protection "1; mode=block";
add_header Referrer-Policy "no-referrer-when-downgrade";
}
}
Subject Author Posted

Nginx reverse proxy regex help

blason September 17, 2021 01:34AM

Re: Nginx reverse proxy regex help

Francis Daly September 18, 2021 03:52AM

Re: Nginx reverse proxy regex help

blason September 18, 2021 10:53PM

Re: Nginx reverse proxy regex help

Francis Daly September 19, 2021 03:16AM

Re: Nginx reverse proxy regex help

blason September 19, 2021 08:25AM

Re: Nginx reverse proxy regex help

blason September 19, 2021 08:44AM

Re: Nginx reverse proxy regex help

blason September 19, 2021 10:24AM

Re: Nginx reverse proxy regex help

Francis Daly September 20, 2021 01:12PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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