Welcome! Log In Create A New Profile

Advanced

Redirect / Proxy / Map subdomain to domain with port number

Posted by Omly 
Redirect / Proxy / Map subdomain to domain with port number
December 31, 2021 03:46PM
Hi all,

I got a flask server accepting only POST requests on
https://domain.com:13000/data

Can anyone help me redirect / proxy / map
https://domain.com:13000/data
to https://abc.domain.com subdomain?

https://domain.com:15000/data
to https://xyz.domain.com subdomain?

I tried:
if ($host = xyz.domain.com) {
return 301 https://xyz.domain.com:13000/data;
}

This redirects https://xyz.domain.com to https://xyz.domain.com:13000/data
but it doesn't include the 'POST' message.

I do not get a POST message in the Flask
server output like I used to.

data => nginx => https://xyz.domain.com => https://xyz.domain.com:13000/data

Thanks in advance.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 176
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready