A bit of help

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/">http://library.linode.com/lamp-guides/ubuntu-10.04-lucid/ and installed Apache,PHP, MySQL, and did everything on that page, and have copied all the files from my old server's publichtml directory to the /srv/www/elitemobs.com/publichtml 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?

9 Replies

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.

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.

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.)

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.

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.

@shadowx360:

gives a 404 error file not found.
@shadowx360:

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:

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.

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?

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

> 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 Order allow,deny

Deny from all

Satisfy all

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.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct