Answer the question
In order to leave comments, you need to log in
Nginx as a router for subdomains to ports, how?
Hello.
There is a subdomain abc.site.com which, through route53 through type A, shows on IP
On the server at the moment there are 2 docker projects, one on port 8081, the other on 8082
Target:
xy.abc.site.com -> abc.site.com :8081
xz.abc.site.com -> abc.site.com:8082
I tried using Type SVR - it did not work, it showed that dns was not found.
Googling, I decided to do
it through proxy_pass in Nginx
. by going to xy.abc.site.com, which refers to abc.site.com/xy and the server says:
location /xy/ {
proxy_pass https://abc.site.com:8081/;
}
Answer the question
In order to leave comments, you need to log in
For each subdomain, you need to create a separate virtual host.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question