[英]Hosting Website LIVE on the domain I've bought
I'll get straight to the point.我将进入正题。 I have bought a domain.
我买了一个域名。 I want to host it on my computer, maybe on a raspberry pi since only 50 persons/month will visit it.
我想在我的电脑上托管它,也许在树莓派上,因为每月只有 50 人会访问它。
Anywhere I've looked I see two hosting methods, using IIS/WAMP/XAMPP to only create a localhost website or adding the domain to C:\\Windows\\System32\\drivers\\etc\\hosts.txt that is also... localhost.在我看过的任何地方,我都看到了两种托管方法,使用 IIS/WAMP/XAMPP 仅创建一个本地主机网站或将域添加到 C:\\Windows\\System32\\drivers\\etc\\hosts.txt 这也是...本地主机。
What is the magic answer here?这里的神奇答案是什么? How can I host LIVE a website with the domain that I have bought?
如何使用我购买的域名托管网站? Am I stuck to using a hosting service?
我是否坚持使用托管服务? Am I missing something really important?
我错过了一些非常重要的东西吗?
using IIS/WAMP/XAMPP to only create a localhost website
使用 IIS/WAMP/XAMPP 只创建一个本地主机网站
You need an HTTP server if you want to host a website.如果要托管网站,则需要 HTTP 服务器。 It needs to run on the computer you want to host the website from.
它需要在您要托管网站的计算机上运行。
adding the domain to C:\\Windows\\System32\\drivers\\etc\\hosts.txt
将域添加到 C:\\Windows\\System32\\drivers\\etc\\hosts.txt
That's what you do as a poor man's solution instead of buying a domain name.这就是你作为穷人的解决方案,而不是购买域名。
The Domain Name needs to be associated with a DNS server (and secondary DNS server) by your registrar.您的注册商需要将域名与 DNS 服务器(和辅助 DNS 服务器)相关联。
Usually, a registrar will provide DNS hosting services as part of the deal.通常,注册商会提供 DNS 托管服务作为交易的一部分。
The DNS server needs an A record pointing at the IP address of the computer running the web server. DNS 服务器需要一个A 记录,指向运行 Web 服务器的计算机的 IP 地址。 This IP address needs to be available to whomever is going to visit it (which almost certainly needs to be public facing) and should be static (unless you want to play games with very short TTL values and frequent reconfiguration of the DNS servers).
该 IP 地址需要可供访问它的任何人使用(这几乎肯定需要面向公众)并且应该是静态的(除非您想玩具有非常短的 TTL 值和频繁重新配置 DNS 服务器的游戏)。
If you plan to host multiple different websites on the same server, you'll probably want to configure the HTTP server software to handle Virtual Name Hosting (whereby it pays attention to the Host
header in the request and dynamically serves different content based on it)如果您计划在同一台服务器上托管多个不同的网站,您可能需要配置 HTTP 服务器软件来处理虚拟名称托管(从而它会关注请求中的
Host
标头并基于它动态提供不同的内容)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.