简体   繁体   English

在我购买的域名上实时托管网站

[英]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.

相关问题 我买了域名,现在 - I bought a domain name, and now 我的网站是通过直接 URL 访问的,但不是通过我购买的域名访问的。 如何解决问题? - My website is accessed by direct URL but not by the domain name I bought. How to solve the issue? 如何将我的openshift网站定向到我购买的gandi.net域名? 我试过了,但是不行吗? - How do I direct my openshift website to a gandi.net domain name I bought? I tried, but it's not working? 在单独的域上托管网站子文件夹 - Hosting website subfolder on separate domain 交换主机、网站和域名? - Swapping hosting, website and domain over? 如何在 GoDaddy 托管 (cPanel) 上托管我的 webapp(使用 HTML、CSS、JS、节点和快递制作)? 我已经购买了一个域并在其中托管, - How do I host my webapp (made using HTML, CSS, JS, node and express) on GoDaddy hosting (cPanel)? I've already purchased a domain and hosting at it, SPA 和网站的单独托管但共享域 - Separate hosting for SPA and Website but share domain 托管域、email 和所有独立提供商的网站 - Hosting domain, email and website with all separate providers 如何部署/托管在本地构建的 wordpress(.org) 网站到使用 siteground 购买的域 - How to deploy/host a wordpress(.org) website built locally to a domain bought with siteground 我的网站域不断切换主机 IP 地址 - My website domain keeps switching hosting ip address
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM