Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: A bit of help
PostPosted: Tue Jan 04, 2011 8:06 pm 
Offline
Newbie

Joined: Tue Jan 04, 2011 8:00 pm
Posts: 4
Hello, I'm moving a site from my old server (not linode) to my new one I've followed all instructions at http://library.linode.com/getting-started/ and http://library.linode.com/lamp-guides/u ... .04-lucid/ and installed Apache,PHP, MySQL, and did everything on that page, and have copied all the files from my old server's public_html directory to the /srv/www/elitemobs.com/public_html on my new server, and then restarted Apache.

The guides go no further, and I'm uncertain of what's next. What's the magic "on" switch with these servers? Before changing the DNS settings, I would like to make sure the site's fine, and all the PHP scripts run fine. How do I test the scripts?


Top
   
 Post subject:
PostPosted: Tue Jan 04, 2011 8:15 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Edit your hosts fiile (c:\windows\system32\drivers\etc\hosts) on windows (/etc/hosts) on mac/linux with a line for each site with the ip of your linode, this will tell your computer to look for your site at your linode, once you know it's all ok you can take out the changes and change your dns.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Tue Jan 04, 2011 9:30 pm 
Offline
Senior Member

Joined: Fri Jan 09, 2009 5:32 pm
Posts: 634
A suggestion on moving DNS to linode (if you're planning to do so).

Right now, setup your domains in the linode DNS manager, pointing to your current server (not your linode).
Change the DNS servers with your registrar from your current to linode.
Wait a couple days for the DNS server change to propogate.
Then, you can turn down the TTL a day before you're ready to move, change the IP when you're ready, and you should have the world swapping servers in a pretty short timeframe.


Top
   
 Post subject:
PostPosted: Tue Jan 04, 2011 11:23 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Along with glg's suggestion, consider adding an A record for dev.example.com and telling your web server that it is an alias for your site. If you've lived a good clean life and avoided absolute URLs, you (and others) can go to http://dev.example.com/ and hit the new server while http://www.example.com/ continues rolling along.

(This also comes in handy down the road if you want to do a major change to your site, or for just plain ol' continual development purposes.)

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


Top
   
 Post subject:
PostPosted: Wed Jan 05, 2011 8:03 am 
Offline
Newbie

Joined: Tue Jan 04, 2011 8:00 pm
Posts: 4
Ok, but when I point my browser to http://ServerIpAddress.com/home.php, it does not connect to the PHP file, and gives a 404 error file not found. When I did the adding the Virtual Hosts step, I added elitemobs.com (the site), so should I instead point to http://ServerIpAddress.com/elitemobs.com/home.php or something similar? I've restarted Apache a few times, but it still doesn't show that it has any files, the home page at http://ServerIpAddress.com/ says no content as been added.


Top
   
 Post subject:
PostPosted: Wed Jan 05, 2011 9:29 am 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
If you configured your web server to recognize "elitemobs.com" as the server name for your site, that's all it will recognize: elitemobs.com, not www.elitemobs.com or 192.0.2.1 or unrelated-site.example.com or anything like that. Usually, you can add an alias for your IP address to one site, or specify a default when no sites match.

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


Top
   
 Post subject:
PostPosted: Wed Jan 05, 2011 11:12 am 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
shadowx360 wrote:
gives a 404 error file not found.

shadowx360 wrote:
home page at http://ServerIpAddress.com/ says no content as been added.

When you connect to your server with a domain name that the server doesn't recognize, it will try to serve files from /var/www by default. That's why the website looks empty.

You should list each and every name you wish to use (even for testing) to your VirtualHost configuration, in the ServerAlias line. This name can be anything for the purpose of testing. A temporary subdomain pointing at your Linode would work just fine. (You might have to wait a couple of hours for the new subdomain to be recognized, depending on where your DNS is hosted.)

hoopycat wrote:
If you've lived a good clean life and avoided absolute URLs

Biggest offender: WordPress. It automatically redirects to the domain where it was first installed, making it very annoying when performing migrations. Somebody's lame idea of SEO, I guess.


Top
   
 Post subject:
PostPosted: Wed Jan 05, 2011 4:19 pm 
Offline
Newbie

Joined: Tue Jan 04, 2011 8:00 pm
Posts: 4
Ok, so how do I create an alias for my site (using Virtual Hosting)?

Also, is it against the TOS to use a torrent client such as TorrentFlux, given that no illegal content is being distributed?


Top
   
 Post subject:
PostPosted: Wed Jan 05, 2011 6:01 pm 
Offline
Newbie

Joined: Tue Jan 04, 2011 8:00 pm
Posts: 4
I hate to doublepost, but the DNS records were just updated, and the site is being pointed to my linode server now. But when I load http://elitemobs.com/, it says

Quote:
Forbidden

You don't have permission to access / on this server.


Something I'm doing wrong here?

In my httpd.conf, I have it as <Files ~ "^\.ht">
Order allow,deny
Deny from all
Satisfy all
</Files>


Top
   
 Post subject:
PostPosted: Wed Jan 05, 2011 7:12 pm 
Offline
Senior Member

Joined: Fri Dec 10, 2010 6:45 pm
Posts: 63
Working now? Looks like it is minus the comma in the url. For SEO, it's probably better to have a non-www domain point to www.domain.com or visa-versa rather than both working at the same time.

To do this look up 301 redirect with apache.


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