Answer the question
In order to leave comments, you need to log in
How to set up subdomain redirection to another server?
I need help in solving the following problem: I
have a client's domain: www.clientwebsite.ru I
have my website: www.mywebsite.ru
I need the client's subdomain to reflect a specific page of my site.
subdomain.clientwebsite.ru -> www.mywebsite.ru (digitalocean, nginx, unicorn, ruby on rails)
What should be written where?
Thanks in advance
upd 1:
I'll explain - I need the address of the client subdomain and the site to be displayed in a line, and the page itself displays the content of my site.
upd 2:
The solution that came up was a proxy from the nginx side of the client site.
Answer the question
In order to leave comments, you need to log in
there are the following options:
Are these two different sites? If not, then subdomain.clientwebsite.ru must be specified in the server_name directive. Then it’s up to the framework to parse the request from which domain it came from.
For example in nginx
server {
server_name subdomain.clientwebsite.ru;
location / {
return 302 www.mywebsite.ru
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question