Link subdomain from route 53 to shared hosting subdomain

0

It turns out that I have a project in Amazon and for that project I have a domain (midominio.com.mx) running with route 53. There it does all the magic, I configure the balancer that simultaneously goes to several instances, etc, etc. , etc.

I came up with the fantastic idea of creating a blog, but since I have several servers, I do not want to have conflicts with it and spend money pointing all my files to the service of bucket s3 so that everything is synchronized. So I bought another domain (midominio.mx) and linked it with a shared hosting, there I set up my wordpress blog and everything is great, the problem is that the project and the blog (obviously) work under different domains.

I was wondering if he could do the following: Create a subdomain on route 53- > blog.miproyecto.com.mx and point it to work with the subdomain of my shared hosting - > blog.miproyecto.mx (not redirect, but the end user does not realize that both projects are in separate domains (servers).

Is this possible? and if possible, what would be the procedure?

Currently I have the blog created in my other domain and in route 53 I have created a subdomain pointing to the ip of my shared server, but it does not work :( the truth is not even if this is possible >. <

Thank you.

    
asked by Neftali Acosta 08.09.2018 в 06:00
source

1 answer

0

First, it should not be necessary to point your subdomain blog.midominio.com.mx to an IP. It can simply be a CNAME of blog.midominio.mx . With that the registration in Route53 will "follow" the domain even if you move it from one hosting to another.

Second, your shared hosting (as its name suggests) has many customers on one machine. That machine has only one IP (although it may have more, but let's say it is one). To know to which site to send each request, the machine has different vhosts , which basically map a host (domain or subdomain, in this case) to a document_root.

  • The request says blog.midominio.mx? I send it to / var / www / mydomain
  • The request says www.pagina.com? I send it to / var / www / page
  • The request says blog.midominio.com.mx? I do not know that host. I show you a generic page

(this is an example of a shared hosting very insecure, but it illustrates how they route requests)

On that side, you should see if you can add domains to your account in the shared hosting, either in your dashboard or with a support ticket.

Third, if your blog is in wordpress I think I have bad news, because wordpress will always try to redirect to the official domain that appears in the administration panel.

    
answered by 08.09.2018 в 12:17