Transferring Website to Linode with Existing Subdomain
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/
ServerAdmin
ServerName
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
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.
8 Replies
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````
service apache2 restart
.
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:
or this
<*>
and see if that helps.
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.
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.
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
1) Find all of the
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/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:
So, please post your nginx configurations as well.