服务器搬家_搬家日:切换虚拟主机

服务器搬家

It’s going to happen at least once to every webmaster. You either outgrow your web hosting company, they don’t support a new feature that you need, or they just bite. So you set out to find a company to provide a new home for your web site. After days of tedious searching, you find the perfect company to host your site. But, how can you ensure a smooth transition to the new server? Follow these five easy steps to ensure that the transfer goes flawlessly:

每个网站管理员至少都会发生一次。 您要么增长了您的虚拟主机公司,要么它们不支持您需要的新功能,要么就咬人。 因此,您着手寻找一家为您的网站提供新家的公司。 经过几天繁琐的搜索,您会找到托管网站的理想公司。 但是,如何确保顺利过渡到新服务器? 请遵循以下五个简单步骤,以确保传输过程顺利进行:

1.设置新帐户并上传 (1. Set Up the New Account and Upload)

When setting up the account at the new hosting company, be sure to tell them that you do not want them to transfer the domain name until you tell them to do so.

在新的托管公司设置帐户时,请确保告诉他们您不希望他们转让域名,除非您告诉他们这样做。

Obtain a login name and password for your new account from the webhost company. You’ll be logging into an IP address (something like 209.207.44.3), rather than a domain name like yahoo.com.

从Webhost公司获取新帐户的登录名和密码。 您将登录IP地址(例如209.207.44.3),而不是yahoo.com之类的域名。

Replicate your current directory structure on the new server and upload everything but your CGI/PERL scripts. You’ll have to ask the new hosting company where PERL is located on the server and the directory where your site resides. If it’s different than what you currently have (and I bet it will be) then you’ll have to edit the scripts manually to reflect the changes before uploading them.

在新服务器上复制当前目录结构,并上传除CGI / PERL脚本以外的所有内容。 您必须询问新的托管公司PERL在服务器上的位置以及您的站点所在的目录。 如果与您当前拥有的不同(我敢打赌),那么您必须手动编辑脚本以反映更改,然后再上传。

Tip: Upload all of your HTML files in ASCII mode. This will prevent the “blank page” syndrome that may occur when uploading in Binary mode. Check the instructions that come with your FTP program to find out how to change the settings.

提示:以ASCII模式上载所有HTML文件。 这将防止在二进制模式下上传时可能出现的“空白页”综合症。 查看FTP程序随附的说明,以了解如何更改设置。

2.测试几页 (2. Test a Few Pages)

Make sure the upload went well, and that everything is working after the domain name transfer takes place by testing a few key pages. This will require you to manually type in a few URLs. They will look something like this:

通过测试几个关键页面,确保上传正常,并且在域名转让后一切正常。 这将要求您手动输入一些URL。 他们看起来像这样:

http://209.207.44.3/faq.htm http://209.207.44.3/contact.htm etc.

http://209.207.44.3/faq.htm http://209.207.44.3/contact.htm等

Just replace the IP address with what your hosting company assigned you, and the HTML file names with the names of the actual files residing on your server.

只需将IP地址替换为托管公司为您分配的IP地址,然后将HTML文件名替换为服务器上实际文件的名称即可。

If you click on any of the links on your test pages, you will be transferred to your current server rather than the new server, which is where you want to be. The only exception is if you used relative rather than absolute paths for your URL linking.

如果单击测试页上的任何链接,您将被转移到当前服务器,而不是新服务器,该服务器就是您想要的服务器。 唯一的例外是,如果您使用相对路径而非绝对路径进行URL链接。

Relative URL: contact.htm Absolute URL: http://site.com/contact.htm

相对网址:contact.htm绝对网址:http://site.com/contact.htm

This is also a good opportunity to test your scripts, although you’ll have to change any domain name references in the script to the IP address of your site on the new host.

这也是测试脚本的好机会,尽管您必须将脚本中的任何域名引用更改为新主机上站点的IP地址。

3.转移域名 (3. Transfer the Domain Name)

Once everything is on the new server and working properly, email your hosting company and tell them to transfer your domain name. Usually, you’ll receive an email from Network Solutions within 24 hours asking you to confirm the transfer. Simply reply to that email and wait.

一旦一切都在新服务器上并且可以正常工作,请给您的托管公司发送电子邮件,并告诉他们转让您的域名。 通常,您会在24小时内收到来自网络解决方案的电子邮件,要求您确认传输。 只需回复该电子邮件并等待。

Once the transfer has been completed, you’ll have to wait up to two weeks for the DNS servers around the world to be updated. During that time, maintain two copies of your site. Even after your DNS server has updated, you will want to maintain two copies of the site for a little while for the benefit of those whose ISP’s DNS servers have not been updated.

传输完成后,您最多需要等待两周的时间才能更新全球的DNS服务器。 在此期间,请维护您的网站的两个副本。 即使在您的DNS服务器更新之后,您仍要保留站点的两个副本一小段时间,以使那些尚未更新ISP的DNS服务器的用户受益。

A good way to know when your own ISP has updated is to upload a slightly different version of a particular page to the new server. When you type in: http://site.com/page.htm and see the different version you’ll know that your ISPs DNS servers have been updated.

知道您自己的ISP何时更新的一个好方法是将特定页面的稍有不同的版本上载到新服务器。 当您输入:http://site.com/page.htm并看到不同的版本时,您将知道ISP的DNS服务器已更新。

Hot Tip: Once the new copy of your site is up and running, contact your current host and ask them to change the MX record so that it points to the IP address of your site on your new web host. This will remove the need for maintaining two sites.

热门提示:网站的新副本启动并运行后,请与您当前的主机联系,并要求他们更改MX记录,使其指向新Web主机上您网站的IP地址。 这将消除维护两个站点的需要。

4.稍等片刻,然后取消您以前的帐户 (4. Wait A Bit and Then Cancel Your Previous Account)

During the waiting period, you’ll have two email accounts to check (if you use the POP accounts your hosting company provides for you). The best way to proceed with checking them is to use the IP addresses of your site on both the old and new server, as the POP server in your e-mail program, rather than using domain names.

在等待期间,您将需要检查两个电子邮件帐户(如果使用托管公司为您提供的POP帐户)。 进行检查的最佳方法是在电子邮件服务器上将旧服务器和新服务器上的站点IP地址都用作POP服务器,而不要使用域名。

After a week or two, cancel the account with the previous hosting company. A good way to determine when it’s time to pull the plug on your old account is when the email stops coming into the account on your old server.

一两个星期后,请取消先前托管公司的帐户。 确定何时该断开旧帐户的一个好方法是电子邮件何时停止进入旧服务器上的帐户。

5.休息一天 (5. Take a Day Off)

If all has gone well, give yourself a day off for a job well done!

如果一切顺利,请给自己一天假,好好完成工作!

翻译自: https://www.sitepoint.com/day-switching-web-hosts/

服务器搬家

    原文作者:culi4814
    原文地址: https://blog.csdn.net/culi4814/article/details/108390713
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞