如何通过子域而不是IP+港口?
我的本地网络中有一个小型服务器,它提供多种 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您正在寻找的是设置域名服务器(DNS)。 phoenixnap.com/kb/raspberry-pi-dns-server本指南应该有所帮助。
您使用域将
ip:port组合
直接定向。就像您可以指导123.12.12.12:8080
wose> whing
和123.12.12.12.12:8081
toany.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 direct123.12.12.12:8080
tosome.thing
and123.12.12.12:8081
toany.address
.The domain name is arbitrary and masks the whole IP:port address.