Score:0

Need help on Nginx reverse Proxy

eg flag

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 of 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 the location

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";
}
}
Michael Hampton avatar
cz flag
Check your logs.
Blason R avatar
eg flag
This issue is resolved by adding proxy_ssl_server_name on; after proxy_pass
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.