Tomcat 6 和 DNS 查找
我正在 CentOS 5 系统上的 Tomcat 6.0.32 上运行一个 Web 应用程序。
到目前为止,仅注册了一个 DNS 名称 (abcd.sg)。它没有映射到它的 IP 地址。
我有一个 Tomcat 在 xx.xxx.xxx.xxx:8080 上运行,如果我点击 URL http://xx.xxx.xxx.xxx:8080/webappname,它会显示我的网站。
如何或者更确切地说在哪里将 IP 映射到 DNS,以便如果我点击 abcd.sg,它会将我指向 http://xx.xxx.xxx.xxx:8080/webappname?我可以自己做吗,还是必须回到 DNS 注册商那里做?
I am running a web application on Tomcat 6.0.32 on CentOS 5 system.
As of now, only a DNS name has been registered (abcd.sg). It does not have an IP address mapped to it.
I have a Tomcat running at xx.xxx.xxx.xxx:8080 and if I hit the URL http://xx.xxx.xxx.xxx:8080/webappname, it shows my website.
How or rather where do I map the IP to the DNS so that if I hit abcd.sg it points me to http://xx.xxx.xxx.xxx:8080/webappname? Can I do it on my own, or do I have to go back to the DNS registrars for doing it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须告诉 dns 服务器将名称“指向”何处。所以你自己确实不可能完全做到这一点。您需要更新附加到注册名称的“dns 记录”,以便将名称映射到 IP 并传播到所有不同的 DNS 服务器。
如果您通过像 godaddy 或类似的人注册了 dns,这些网站上有非常容易使用的工具来更新您的姓名记录。在这些记录中,您还可以映射子域、电子邮件名称和各种其他内容。
但大多数情况下,仅靠服务器配置本身无能为力。 :)
编辑:
嗯,DNS 的事情更多的是互联网的事情,而不是关于你的机器/服务器或安装的工具的事情。实际上只有 3 个组件:
1)您机器的 IP 配置(以及您的 ISP 配置),其中您已经有一个工作 IP 号码及其服务页面,所以这很好。
2)特定的网络服务器配置,从您所说的情况来看,您只有一个站点,因此您不需要添加或配置任何“虚拟服务器”。
3) 剩下的就是 DNS 到 IP 的映射,它发生在你的机器之外,因为这是其他服务器在某种合作古老的 DNS 服务器中的责任。浏览器使用 DNS 服务器中的 DNS 名称询问您服务器的 IP,然后才会将内容发送到您的计算机。
拥有 Plesk 本身并不会为您带来任何东西,只是在您的计算机上提供更多软件。你从哪里买的名字?您需要要求他们更新 DNS 记录,或者询问在哪里可以更新 DNS 记录以指向您的 IP。并特别询问安装 plesk 是否会以某种方式授予您编辑 DNS 记录的权限。 DNS 记录位于其他地方,而不是在您的计算机上,并且对于对您而言重要的事情,它是唯一不能从您的计算机专门控制且不在您的计算机本身上的事物之一。
抱歉,您遇到了麻烦;希望这个相当通用的信息有帮助。如今,将 DNS 映射到 IP 通常非常容易,他们应该能够为您完成此操作或为您提供非常具体的说明。 :)
一个可以在任何类型的机器、Windows、Unix 或其他机器上运行的简单测试是使用“ping”或“tracert”或“traceroute”来免费查找并指示 dns 名称当前指向的位置。
喜欢:
ping my.name.com
tracert my.name.com
然后您应该会看到该记录当前指向的 IP 号码。使用tracert或traceroute,您还可以了解该服务器指向的位置,无论您被告知是对还是错。
You have to tell the dns servers where to "point" the name. So there is really no way you could totally do it yourself. You need to update your "dns record" attached to the registered name in order to have the name map to an IP and propagate to all the various DNS servers.
If you registered the dns with someone like godaddy or similar, there are very easy to use tools on those sites to update the records for your name. In these records you can also map subdomains, email names, and various other things.
But mostly there is nothing you can do with just the servers config by iteself. :)
Edit:
Well the DNS thing is more of an internet thing than something about your machine/server or the tools intsalled. There are really only 3 components:
1) IP config of your machine (and your ISPs config), where you already have a working IP number and its serving pages, so thats fine.
2) The specific webserver config, where from what you said you only have one site, so you dont need to add or configure any "vitual servers".
3) And whats left is the DNS to IP mapping, which happens outside of your machine, as thats the resposibility of other servers in a sort of co-operative age old DNS server thing. A browser asks for the IP of your server using the DNS name form the DNS servers, and then and only then will send things to your machine.
Having plesk in and of itself doesnt give you anyting but more software on your machine. Where did you buy the name from? You need to ask them to update the DNS record or ask where you can update the DNS record to point to your IP. And specifcally ask if installing plesk will somehow give you access to edit the DNS record. The DNS record is elsewhere and not on your machine, and is one of the only things, for the things that matter to you, that you dont control specifically from your machine and isnt on your machine itself.
Sorry you are having trouble; hope this rather generic info helps. Its normally very very easy these days to map the DNS to the IP, they should be able to do it for you or give you extremely specific instructions. :)
A simple test that should work from any kind of machine, windows, unix or otherwise, is to use "ping" or "tracert" or "traceroute" to get a free lookup and indication of where the dns name is currently pointing to.
Like:
ping my.name.com
tracert my.name.com
Then you should see the IP number that the record currently points to in the wild. With tracert or traceroute you can also get an idea of where that server its pointing to lives, despite whatever you may be being told right or wrong.