admin管理员组

文章数量:1529455

为什么资料从托管变成非托管

This article is part of a series created in partnership with SiteGround. Thank you for supporting the partners who make SitePoint possible.

本文是与SiteGround合作创建的系列文章的一部分。 感谢您支持使SitePoint成为可能的合作伙伴。

There are many situations in which you might decide that self-hosting your website is the way to go. You may be a freelancer, an entrepreneur, or be running a personal or even non-profit site. You may wish to host the site on an always-on PC in your basement, or on a small server in your workplace.

在许多情况下,您可能会决定以自行托管网站为路。 您可能是自由职业者,企业家,或者正在运行个人甚至非营利性网站。 您可能希望将站点托管在地下室始终在线的PC上,或工作场所中的小型服务器上。

Regardless of the situation, on-premise hosting is usually a bad idea. In this post, you’ll have some reasons for that explained, in the hopes of providing useful information or warnings to both business decision makers as well as developers who are inexperienced with the “operations” side of the Internet – in this case, hosting websites.

无论何种情况,本地托管通常都是一个坏主意。 在这篇文章中,您将有一些解释的理由,希望为业务决策者以及对Internet的“操作”方面不熟悉的开发人员提供有用的信息或警告。网站。

自托管有更多的启动障碍 (Self-Hosting Has More Barriers to Starting)

Depending on your Internet Service Provider (ISP) and your situation (whether you have a business class service package or a residential one), you may run into issues with your ISP blocking port 80 — the port to which most Internet traffic defaults. You may also be issued warnings or even have your service shut down if you host websites on-premise. This is most common when you are trying to host a site from your home connection and the ISP prefers that if you wish to do so, you purchase a business Internet package that is perhaps thrice as expensive.

根据您的Internet服务提供商(ISP)和您的情况(无论是商务类服务包还是住宅类),您的ISP可能会遇到阻塞端口80(大多数Internet流量默认使用的端口)的问题。 如果您在内部托管网站,则可能还会向您发出警告,甚至关闭服务。 当您尝试通过家庭连接托管站点时,这是最常见的情况,而ISP则希望,如果您愿意这样做,则购买的商务Internet软件包的价格可能是其价格的三倍。

However, some ISPs can still provide limitations even to the business class packages that can thwart your attempts to get your website up and running. Additionally, you will also need a static IP address, which may be an added cost, depending on how your ISP plans work. Most home (and some business) connections use dynamic IP addresses, which means that they change from time to time. If your IP address, the way by which your network can be found online, sometimes changes, you will have no easy, reliable way to point users who come to yourdomain to your on-premise hosting setup.

但是,某些ISP甚至仍然可以限制商务类软件包,从而阻碍了您使网站正常运行的尝试。 此外,您还需要一个静态IP地址,这可能会增加成本,具体取决于您ISP计划的工作方式。 大多数家庭(和某些企业)连接使用动态IP地址,这意味着它们会不时更改。 如果您的IP地址(可以在线找到网络的方式)有时发生变化,那么您将没有任何简单,可靠的方法来将进入yourdomain用户yourdomain到您的本地托管设置。

自托管您的网站可能会带来安全风险 (Self-Hosting Your Website Can Create Security Risks)

There are security risks in anything you do on the Internet, of course, but hosting a website on your network opens you up to even more, especially if you’re not certain of what you’re doing. Websites big and small are subjected to denial of service attacks and scripting attacks, sometimes at mind-blowing volume. Your website can be for a single freelancer, a small startup, a two hundred person small company, or an enterprise outfit, and they all will attract attacks — some of which may even be automated and not even take into account the content of the site in question.

当然,在Internet上进行的任何操作都存在安全风险,但是在网络上托管网站可以使您承担更多的责任,尤其是在不确定自己在做什么的时候。 大型和小型网站都遭受拒绝服务攻击和脚本攻击,有时甚至是令人震惊的。 您的网站可以是一个自由职业者,一个小型创业公司,一个有200人的小型公司或企业机构的网站,它们都会吸引攻击-其中一些攻击甚至可能是自动化的,甚至没有考虑到网站的内容问题。

Hosting a web server on your network, if you’re not careful, may open your network up to a Pandora’s Box of security troubles that you’d never have to deal with if you hosted your website with a cloud service provider rather than on premise. Do you know enough about web servers (and, if your web server is Linux, do you know the command line)?

如果您不小心在网络上托管Web服务器,则可能使您的网络面临潘多拉盒装的安全隐患,如果您使用云服务提供商而不是在内部托管网站,则永远不必处理。 您对Web服务器了解得足够多(并且,如果您的Web服务器是Linux, 您是否知道命令行 )?

自托管您的网站不太可靠 (Self-Hosting Your Website is Less Reliable)

Another point to consider about self-hosting your website is that you have less options for dealing with things like downtime and service outages.

关于自托管网站的另一点要考虑的是,您处理诸如停机时间和服务中断之类的事情的选择较少。

If your power goes out in the typical residential or small business location, you have no control over the situation that follows. How long will it be out? Minutes? Hours? Days, even? It depends on the circumstance. What if a child touches or damages something they shouldn’t, if it’s in your home? What about in the office, if a careless employee spills a drink, or pulls the wrong cord?

如果您的电源在典型的住宅或小型企业中停电,则无法控制随后的情况。 会持续多久? 分钟? 小时? 天,甚至? 这要视情况而定。 如果孩子在家中碰触或损坏了他们不应该碰到的东西怎么办? 如果粗心的员工洒了一杯酒或拉错了绳子,在办公室怎么办?

Even if you secure your website on a server in a server cage in a dedicated room in your office, you can still run into random events such as a plumbing leak or an Internet service outage. If your bandwidth is exceeding the allotted amount, your ISP may throttle or shut down your connection. Many of these things are entirely out of your control.

即使您将网站保护在办公室专用房间的服务器机架中的服务器上,也可能会遇到随机事件,例如管道泄漏或Internet服务中断。 如果您的带宽超出了分配的数量,您的ISP可能会限制或关闭您的连接。 其中许多事情完全不受您的控制。

All of these points are mitigated by using a hosting service which uses a professional data center to house its servers. They have multiple power and Internet providers, generators, cooling, security, fire suppression systems, offsite backups, and even redundancy to other locations. It’s more than you can possibly provide in-house if you’re the average small business or individual.

通过使用托管服务可以缓解所有这些问题, 托管服务使用专业的数据中心来容纳其服务器。 他们有多个电源和Internet提供商,发电机,冷却,安全,灭火系统,异地备份,甚至到其他位置都有冗余。 如果您是普通的小型企业或个人,那么它不仅可以提供内部服务。

考虑自托管网站的成本 (Considering the Costs of Self-Hosting Your Website)

Let’s take a few looks at the costs of self-hosting your website:

让我们看一下自我托管网站的成本:

  • Static IP – You’ll need a static IP address in order for people to properly find your web server when they enter your site’s address into their browser. That typically costs extra on your Internet bill.

    静态IP –您需要一个静态IP地址,以便人们在浏览器中输入站点地址时能够正确找到您的Web服务器。 通常,这会在您的Internet账单上额外收费。
  • Better Internet Connection – You also may want a better Internet connection, especially if your website begins to gain in traffic. This, too, will cost you.

    更好的Internet连接–您可能还希望更好的Internet连接,尤其是在您的网站开始获得流量的情况下。 这也将花费您。
  • Equipment – You also need equipment to put the website on. A server, or a computer whose primary (or only) task is to function as a web server. If you are using Windows, you’ll need an operating system license and perhaps other software. You may also need extra peripheral equipment – such as a switch or router — that you might not have needed otherwise.

    设备–您还需要设备才能打开网站。 服务器或计算机,其主要(或唯一)任务是充当Web服务器。 如果您使用的是Windows,则需要操作系统许可,也许还需要其他软件。 您可能还需要其他外围设备,例如交换机或路由器,否则可能不需要。
  • Backups – You’ll need to pay for an external cloud backup service, if at all possible, and you’ll also need the equipment, software, and time spent on performing local backups as well. You want a backup copy of your data both on-site and off-site, so that you can use the local copy to do quick recoveries, and the off-site copy in a disaster. All of this will also cost money, and the time to set it up and test your backups occasionally to ensure the system is working.

    备份–如果可能,您将需要购买外部云备份服务,并且还需要设备,软件以及执行本地备份所花费的时间。 您需要现场和异地数据的备份副本,以便可以使用本地副本进行快速恢复,并在灾难中使用异地副本。 所有这一切也将花费金钱,并且花费时间来设置它并偶尔测试您的备份以确保系统正常工作。
  • Paying Consultants – Finally, you should assume you’ll end up needing to pay consultants. Your business may not have the expertise locally to deal with certain networking or programming issues, and if you’re a solo shop, even more so. You might as well chalk this up as a necessity, and have an emergency budget to deal with it when you need it.

    支付顾问–最后,您应该假设自己最终将需要支付顾问。 您的公司可能没有本地的专业知识来处理某些网络或编程问题,如果您是一家独立商店,则更是如此。 您不妨将其归为必要,并在需要时有紧急预算来处理。

结论 (Conclusions)

Why are you considering this?

你为什么要考虑这个?

If it’s to retain control of things (you don’t trust third parties to host your site) consider the technological and safety concerns here and ask yourself who is in a better position to safely and effectively deliver your website content to visitors – your business office, or a hosting company whose entire purpose is to do this?

如果要保留对事物的控制权(您不信任第三方托管您的网站),请考虑此处的技术和安全问题,并问问自己,谁能更好地安全有效地向访问者提供您的网站内容-您的营业所,或整个目的是托管公司?

Is it to save money? Take a look at the incredibly affordable and full-featured hosting offerings with reputable hosts such as our partner, SiteGround. They solve all of these issues for you without a huge investment. If your business requires a website (and which one doesn’t?) and cannot afford at least a reliable hosting service, perhaps the business itself is in question. What does your business have in its budget that could be replaced (a few dollars a month) in order to pay for the monthly hosting bill? Think about it.

是为了省钱吗? 与信誉卓著的主机(例如我们的合作伙伴SiteGround)一起查看价格实惠且功能齐全的主机产品。 他们无需大量投资即可为您解决所有这些问题。 如果您的企业需要一个网站( 哪个网站不需要? )并且至少不能提供可靠的托管服务,则可能是企业本身存在疑问。 您的企业在预算中有什么可以替换的(每月几美元)来支付每月的托管费用? 想一想。

Have any experiences, good or bad, with self-hosting your website? Let us know in the comments.

有什么经验,无论好坏,自我托管您的网站? 让我们在评论中知道。

翻译自: https://www.sitepoint/self-hosting-your-website-bad-idea/

为什么资料从托管变成非托管

本文标签: 是一个您的坏主意自我资料