Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Cross-VPS subdomain
PostPosted: Sun Mar 30, 2014 6:16 pm 
Offline
Newbie

Joined: Sun Mar 30, 2014 6:08 pm
Posts: 2
Looks like this has been asked before, but it's not solving my problem in this case:

I have a Linode hosting one site. I have a second Linode which contains an application that I want to access through a subdomain of the domain of Linode 1.

Currently, I have created the A record for the domain on Linode 1 in the Linode DNS Manager, which points at the IP address of Linode 2.

I have also created an nginx vhost record for the subdomain:

Code:
server {
    listen   80;
    server_name beta.XXXX.com;
    access_log /srv/www/beta.XXXX.com/logs/access.log;
    error_log /srv/www/beta.XXXX.com/logs/error.log;

    location / {
        root   /srv/www/beta.XXXX.com;
        index  index.html index.htm;
    }
}


There is also a primary domain for Linode 2, which works fine (although currently it is disabled), and if I go to Linode 2's IP address, i get the default "nginx is working" page.

I have no reason to suspect that setting up the subdomain nginx vhost entry didn't work, as the error.log is blank.

However, I'm getting DNS failure when trying to connect to the subdomain. (i.e. page cannot be found)

Is there something i'm missing? Do I need to create a duplicate A record in the master zone for Linode 2 that matches the subdomain of the master zone for Linode 1? This is also the first time i've worked with nginx so is there something i'm missing there? A vhost ordering issue maybe?

Thanks.


Top
   
 Post subject: Re: Cross-VPS subdomain
PostPosted: Sun Mar 30, 2014 6:25 pm 
Offline
Senior Member

Joined: Fri Feb 17, 2012 8:20 pm
Posts: 365
So basically you will have 2 different linodes under 2 different domains. You just link to the second domain from the website of the main domain?

If you're getting DNS errors that's -before- you even reach nginx or the entire linode server. Normally all you need to do is create an A/AAAA record for the subdomain (beta) that points to the IP of your Linode 2.

Note that it does usually take 15-30 minutes before Linode DNS is changed throughout all their nameservers, and you may also have some DNS caching yourself. Try doing a dig @ns{1-5}.linode.com beta.<domain> to see if it resolves.

Without giving us the domain you are having issues with we can't really help you diagnose the issue.


Top
   
 Post subject: Re: Cross-VPS subdomain
PostPosted: Mon Mar 31, 2014 2:39 am 
Offline
Newbie

Joined: Sun Mar 30, 2014 6:08 pm
Posts: 2
Looks like it may have been an issue with DNS caching locally. The domain seems to resolve without issue this morning.

False alarm! Thanks for the comment about dig though, I wasn't aware of that tool.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group