سؤال

I have at the moment 2 servers that are completely different.

One is a blog server and the other is a rails webapp.

I want the urls to be like:

myserver.com      -> goes to the blog
www.myserver.com  -> goes to the blog
*.myserver.com    -> goes to the webapp

currently i'm doing like this: (its not working)

A      blog   <webapp server ip>
A      @      <blog server ip>
CNAME  www    @
CNAME  *      @

this is the setup on my digital ocean DNS settings

if this is not possible, how can i make this layout:

blog.myserver.com -> goes to the blog
*.myserver.com    -> goes to the webapp
هل كانت مفيدة؟

المحلول

A  @      blog.server.ip
A  www   blog.server.ip
A  *      webapp.ip 

should do what you want. The wildcard in most situations is used as a catchall so if an existing record exist, it will use that.

and if they call point to the same IP address you can just do

A  @      server.ip
CNAME *   @

and then use your webserver to point the virtual hosts to the correct place.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top