需要有關 Nginx 反向代理的協助

需要有關 Nginx 反向代理的協助

我的伺服器的 URL 是https://xx.xx.xx.xx/TestPage/生成為

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

現在我已經在此伺服器前面實作了 nginx 反向代理,然後我將 proxy_pass 設定為

代理通行證https://xxx.ssss.sss.ss/TestPage;

現在,如果您在 TestPage 之後看到添加了一個唯一值,然後是 index.aspx,但是每當請求通過 nginx 傳遞時,我都會收到 502 badgateway。

想知道如何透過正規表示式傳遞這個獨特的值?

請幫忙

這是位置

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";
}
}

相關內容