在本地计算机上设置网站

发布于 2024-07-11 18:49:35 字数 152 浏览 5 评论 0原文

我的办公室有快速的专用互联网连接和静态 IP 地址。 我还想在我的服务器计算机(win server 2003)上托管一个网站。 我知道如何通过 IIS 设置网站,但不知道如何将我的域指向我的网站并配置我的服务器为该域提供服务。 任何人都可以向我指出如何实现这一目标的最佳分步指南吗?

I have a fast dedicated internet connection and a static IP address at my office. I also have a web site that I want to host on my server machine (win server 2003). I know how to setup a web site through IIS but have no clue how to point my domain to my site and configure my server to serve for that domain. Can anyone point me to a preferably step-by-step guide on how to achieve this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

蓝梦月影 2024-07-18 18:49:35

就 DNS 而言,最简单的方法是使用 EveryDNS 之类的服务来配置您的域指向你的IP。 在您的域名注册商处,将名称服务器设置为 EveryDNS 的名称服务器:

ns1.everydns.net
ns2.everydns.net
ns3.everydns.net
ns4.everydns.net

然后您要为您的域创建一条“A”记录,其值是您托管站点的 IP 地址。 我不使用 IIS,因此服务器上可能需要一些额外的配置,但对于我使用的 HTTP 服务器(Apache、lighttpd)来说,这就是启动和运行站点所需的全部内容。

祝你好运!

ps 您提到您希望通过互联网连接来提供该网站服务。 除非它是一个小型的业余爱好网站,否则我建议您选择托管提供商,原因如下:

  1. 带宽通常不对称 - 即下行链路速度超过上行链路速度。 浏览互联网时,下行链路是限制因素,但在提供内容时,上行链路是瓶颈。

  2. 那些在办公室与您共享连接的人可能会导致连接饱和,或者如果您所服务的站点出现这种情况,就会感到沮丧。

  3. 您可能没有 SLA,这意味着如果互联网出现故障,您的提供商没有及时恢复连接的合同义务。

如果这些警告不适用或让您担心,那就继续吧。 但是,如果以上任何一条都适用,那么我建议您考虑寻找托管提供商。

As far as DNS goes, the easiest thing to do would be to use a service like EveryDNS to configure your domain to point to your IP. At your domain registrar, set the nameservers to EveryDNS's nameservers:

ns1.everydns.net
ns2.everydns.net
ns3.everydns.net
ns4.everydns.net

Then you want to create an "A" record for your domain, with the value being the IP address you're hosting the site at. I don't use IIS, so there may be some additional configuration necessary on the server, but with the HTTP servers that I've used (Apache, lighttpd) that's all that's necessary to get the site up and running.

Good luck!

p.s. You mention that you want to serve the site off your internet connection. Unless it's a small hobby site, I'd recommend going with a hosting provider for several reasons:

  1. Often bandwidth isn't symmetrical - i.e. the downlink speed exceeds the uplink speed. When browsing the internet the downlink is the limiting factor, but when serving up content the uplink is the bottleneck.

  2. Those that you share the connection with at the office may saturate the connection, or become frustrated if the site you're serving does.

  3. It's likely that you don't have a SLA, which means that if the internet goes down, your provider has no contractual obligation to restore connectivity in a timely manner.

If these caveats don't apply or worry you, then go right ahead. However, any of the above apply, then I suggest looking into getting a hosting provider.

紧拥背影 2024-07-18 18:49:35

这实际上并不是一个编程问题,但首先您需要配置您的 dns 服务器以指向您的静态 IP 地址。 您可以在域名卖家的网站上执行此操作。

This isn't really a programming question, but to start with you need to configure your dns server to point at your static ip address. You can probably do this at the website of your domain name seller.

红焚 2024-07-18 18:49:35

如果您有一个静态 IP 地址,并且该 IP 是公开的,并且您的域名注册商正在托管您的 DNS,那么这很简单,前提是注册商允许您访问并编辑您的 DNS 设置。 只需登录您的注册商帐户,找到 DNS 管理工具,创建一个新的(或至少有一个)指向您的静态 IP 地址的“A”记录,确保该记录是“www”或“*” ,您就完成了 - 假设您没有任何软件或硬件防火墙,并且您知道如何在 IIS 中设置站点,如您所说。

如果不知道你的配置,或者你是否遇到任何具体问题,很难说更多,但是,是的,听起来概念上唯一缺失的部分是将 A 记录指向你的机器。 祝你好运!

If you have a static IP address, and the IP is exposed publicly, and your domain registrar is hosting your DNS, then it's easy, provided the registrar allows you access to edit your DNS settings. Just log into your registrar account, find the DNS management tools, create a new (or otherwise make there there's at least one) "A" record pointing to your static IP address, make sure that record is either "www" or "*", and you're done -- assuming you don't have any software or hardware firewalls in the way, and you know how to set up the site in IIS, as you say.

It's tough to say more without knowing your configuration, or whether you're having any specific problems, but yeah, it sounds like the only missing piece conceptually is pointing an A record to your machine. Good luck!

双手揣兜 2024-07-18 18:49:35

我第二个“用户:Nobody”。

然而,从你的问题来看,我相信你最后只留下了AName或NameServers的设置以及向IIS添加主机名的一小部分。

I second "User:Nobody" .

However from your Qs , I believe only the Settings up of AName or NameServers and the small part about adding host name to IIS is left in your end.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文