Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Jul 12, 2012 3:58 pm 
Offline
Senior Newbie

Joined: Thu Jul 12, 2012 3:49 pm
Posts: 5
I am currently trying to migrate a WordPress website to my Linode server from GoDaddy's hosting service. While I have followed all of the tutorials in uploading files, setting up databases, etc., I believe I may be having some DNS issues due to an existing subdomain already on the Linode. The existing site on the server is a subdomain of the website I am trying to transfer over.

I have the RDNS record setup for the subdomain, pointing to the Linode's IP, as well as the following record in my DNS Zone File at GoDaddy:

A Record
Host = vote, Points to = 50.116.53.66 (my Linode's IP)

In a tutorial I read, it appears that I must update the A record for the main domain ("@" in GoDaddy's Zone File) and point it to the Linode IP (50.116.xx.xx). I have done this but now when I go to the main/root domain, I get forwarded to the subdomain and cannot access the old website, neither through GoDaddy hosting nor through the files I have migrated to the Linode (including the MySQL database which is migrated).

I have a couple specific questions regarding this issue:
1) Do I need to update the Nameserver (NS) Records in the GoDaddy Zone File to point to the Linode nameservers?
2) Do I need to setup a Zone File through the Linode Manager? If so, should I copy all of my existing (or some of) records from GoDaddy's Zone File?
3) I attempted to update the RDNS to point to my root domain (it's currently the subdomain), and while it works, you can only have one RDNS. Should I leave the RDNS as my subdomain or should I use my root domain?

Lastly, I have setup the necessary sites-available and hosts files as seen below:

/etc/hosts:
127.0.0.1 localhost
50.116.53.66 vote.comparemycandidates.com comparemycandidates
50.116.53.66 comparemycandidates.com cmcmainsite

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

- - -

/etc/apache2/sites-available/comparemycandidates.com:

# domain: comparemycandidates.com
# public: /home/comparemycandidates/public/comparemycandidates.com/

<VirtualHost *:80>
# Admin email, Server Name (domain name), and any aliases
ServerAdmin xxx@comparemycandidates.com
ServerName http://www.comparemycandidates.com
ServerAlias comparemycandidates.com

# Index file and Document Root (where the public files are located)
DirectoryIndex index.html index.php
DocumentRoot /home/comparemycandidates/public/comparemycandidates.com/public

# Log file locations
LogLevel warn
ErrorLog /home/comparemycandidates/public/comparemycandidates.com/log/error.log
CustomLog /home/comparemycandidates/public/comparemycandidates.com/log/access.log combined </VirtualHost>

- - -

Thank you advance for your support as this is only my second Linode (the other on a different account), but the first time migrating a site and hosting multiple sites on the same Linode.


Last edited by comparemycandidates on Thu Jul 12, 2012 5:12 pm, edited 1 time in total.

Top
   
PostPosted: Thu Jul 12, 2012 4:13 pm 
Offline

Joined: Thu Jul 12, 2012 4:06 pm
Posts: 1
I am not sure if you did this step or not... But you might have to run
Code:
a2ensite mydomain.com



There is sites-available, and sites-enabled. I am pretty sure that apache includes all the vhost files in sites-enabled. So you have to enable the site by using the command above and then restart apache with
Code:
service apache2 restart
.


Top
   
PostPosted: Thu Jul 12, 2012 4:16 pm 
Offline
Senior Member
User avatar

Joined: Sun Dec 27, 2009 11:12 pm
Posts: 1038
Location: Colorado, USA
Lets see, I'm running a public website, listed in public Domain Name Servers, running on not one but two public web servers (while being moved).

Yet when I want help, I'll mask any and all public information so that at best people who know how to help will have to play 20 questions getting to the root of the problem.

Yeah, that's a great idea.

Can't be toooooooo paranoid about divulging those PUBLIC DOMAIN NAMES AND IP's.

So try this:

# <generic web command>

or this

# <*************>

and see if that helps.

_________________
Either provide enough details for people to help, or sit back and listen to the crickets chirp.
Security thru obscurity is a myth - and really really annoying.


Top
   
PostPosted: Thu Jul 12, 2012 5:13 pm 
Offline
Senior Newbie

Joined: Thu Jul 12, 2012 3:49 pm
Posts: 5
mwisner - no problems there

vonskippy - I really didn't think anyone would have an issue making head or tails of it but I have uncensored everything (except the e-mail address) to help you.


Top
   
PostPosted: Thu Jul 12, 2012 5:13 pm 
Offline
Senior Newbie

Joined: Thu Jul 12, 2012 3:49 pm
Posts: 5
And yes... the interwebs are a scary place ;)


Top
   
PostPosted: Thu Jul 12, 2012 7:56 pm 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
Seems to be working. From here, http://www., vote., and bare comparemycandidates.com all point to 50.116.53.66. Visiting any of the sites in a browser redirects me to the same page: https://vote.comparemycandidates.com/accounts/login/

Regarding your questions:

1. No, this is not necessary. It is your choice whether to use Linode's nameservers or continue using GoDaddy.

Edit: Your NS records should reflect the same servers designated with your domain registrar. Right now this points to ns##.domaincontrol.com (GoDaddy).

2. You only need to set up name records on Linode if you are going to switch to using Linode's nameservers. In that case, you would need to create records for all names you want to resolve - it's not possible to split a domain and have some names on GoDaddy's DNS and some on Linode's.

3. Not sure if there are any rules against having a bare example.org as your reverse DNS. I would generally suggest using the name that your server thinks it is called (see what hostname -q gets you).

In your /etc/hosts, you should not have more than one line with the same IP address. If you need more names, simply add them to the end of the existing line. For your purposes, I really don't think you need to have anything other than the default localhost and ipv6 entries in there anyway.


Top
   
PostPosted: Fri Jul 13, 2012 11:13 am 
Offline
Senior Newbie

Joined: Thu Jul 12, 2012 3:49 pm
Posts: 5
Thanks for the suggestions and answers.

I'm not certain we are on the same page, however. When I type in the subdomain, vote.comparemycandidates.com, I want to arrive there or some page that's part of it (depends on if you're logged in or not). However, if I type in the root domain, comparemycandidates.com, I want to arrive at that site, the WordPress one that I am trying to migrate, not the subdomain.

I'm not sure what I'm missing but there's gotta be some broken link in the chain of pointing and dns records. /shrug :?


Top
   
PostPosted: Fri Jul 13, 2012 11:14 am 
Offline
Senior Newbie

Joined: Thu Jul 12, 2012 3:49 pm
Posts: 5
I guess another way to put it would be: I have two websites on the same linode. One is a subdomain of the other. How do I make it so visitors can visit both websites under the same IP?


Top
   
PostPosted: Fri Jul 13, 2012 3:46 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
It doesn't matter if it's a 'subdomain' or a completely different domain: Apache's logic for routing the request is the same:

1) Find all of the <VirtualHost [host][:port]> stanzas with the best match for the interface the request arrived on
2) Out of that set, find a stanza with an exactly-matching ServerName or ServerAlias, or find one that matches a wildcard, or find the first one it learned about.

What does the following command say: apache2ctl -S

Also, it appears that you aren't running Apache. nginx is what's issuing the redirect:

rtucker@witte:~$ curl -I http://comparemycandidates.com/
HTTP/1.1 301 Moved Permanently
Server: nginx/0.7.65
Date: Fri, 13 Jul 2012 19:44:10 GMT
Content-Type: text/html
Content-Length: 185
Connection: keep-alive
Location: https://vote.comparemycandidates.com/

So, please post your nginx configurations as well.

_________________
Code:
/* TODO: need to add signature to posts */


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


Who is online

Users browsing this forum: No registered users and 2 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