如何通过子域而不是IP+港口?

发布于 2025-01-17 18:18:52 字数 237 浏览 2 评论 0原文

我的本地网络中有一个小型服务器,它提供多种 Web 服务。可以通过输入服务器的 IP 地址和相应的端口来访问每个服务。

现在我总是必须记住哪个服务位于哪个端口后面,并且将特定的子域转发到这些端口会更好。例如 ip:1234-> foo.server.local ip:4321-> bar.server.local

这是怎么做到的?我在服务器上运行了 pihole,并希望使用 pihole 来完成此操作,但我没有成功。

I have a little server in my local network that provides several web services. Each service can be accessed by entering the ip of the server followed by the respective port.

Now I always have to remember which service is behind which port and it would be nicer to have specific subdomains forwarded to these ports. For example
ip:1234 -> foo.server.local
ip:4321 -> bar.server.local

How can this be done? I have pihole running on the server and had hoped to get this done using pihole but I was not successful.

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

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

发布评论

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

评论(1

裸钻 2025-01-24 18:18:52

您正在寻找的是设置域名服务器(DNS)。 phoenixnap.com/kb/raspberry-pi-dns-server本指南应该有所帮助。

您使用域将ip:port组合直接定向。就像您可以指导123.12.12.12:8080 wose> whing123.12.12.12.12:8081 to any.address
域名是任意的,并掩盖了整个IP:端口地址。

What you are looking for is to set up a Domain Name Server (DNS). phoenixnap.com/kb/raspberry-pi-dns-server This guide should help.

You use a domain to direct to an IP:port combo. Like you could direct 123.12.12.12:8080 to some.thing and 123.12.12.12:8081 to any.address.
The domain name is arbitrary and masks the whole IP:port address.

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