I have pointed a location /tanya to an address http://52.221.238.24/tanya;, I also want /tanya/t/ to point to the same IP.
However, I need to point /tanya/dynamically_generated to point to another IP http://127.0.53.53:3000;
How is it possible using nginx.
I tried the following:
location / {
proxy_pass http://127.0.53.53:3000;
include /etc/nginx/proxy_params;
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /tanya/t/ {
proxy_pass http://52.221.238.24/tanya/t/;
include /etc/nginx/proxy_params;
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /tanya {
proxy_pass http://127.0.53.53:3000;
include /etc/nginx/proxy_params;
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location = /tanya/ {
proxy_pass http://52.221.238.24/tanya;
include /etc/nginx/proxy_params;
proxy_http_version 1.1;
chunked_transfer_encoding off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}