[英]how to link local IP Address to a domain name in local network, so website can be accessible to any device using the domain name?
I am a NOOB to programming and networking so please forgive me for any mistakes.我是编程和网络的菜鸟,所以请原谅我的任何错误。
I have searched on stack,google for my problem but the solutions i found didn't went well with me and so please do consider answering my question even if you consider it is simple or duplicate question.我已经在堆栈、谷歌上搜索了我的问题,但我发现的解决方案对我来说并不顺利,所以即使你认为它是简单或重复的问题,也请考虑回答我的问题。
My Problem - I have a nodeJS
server built using express and it can be accessed on address http://192.168.209.239:8001/
now i want to access server using domain names like normal website say i want to access the server using http://myserver.app/
我的问题- 我有一个使用express构建的
nodeJS
服务器,可以在地址http://192.168.209.239:8001/
上访问它现在我想像普通网站一样使用域名访问服务器说我想使用http://myserver.app/
found Solutions - i found about DNS
but i was not able to set it up, then i found that editing the etc/host
file can solve this but domain name was only working on my laptop where the app is running, if i connect my phone to same network * and when i type the domain name it does not work.找到解决方案- 我发现了
DNS
但我无法设置它,然后我发现编辑etc/host
文件可以解决这个问题,但如果我连接手机,域名只能在运行应用程序的笔记本电脑上运行到同一个网络*,当我输入域名时它不起作用。
I found about mDNS
.我发现了
mDNS
。 but i was a very old post which told we can use Apple Bonjour but it is not working as i learned that Microsoft has done some implementation of mDNS
so make Bonjour work disable mDNS in registry and i am not willing to do that.但我是一篇非常古老的帖子,它告诉我们可以使用Apple Bonjour ,但它不起作用,因为我了解到微软已经完成了一些
mDNS
的实现,所以让 Bonjour 工作在注册表中禁用 mDNS,我不愿意这样做。
What i ask - please give me step by step guide how to stepup DNS or mDNS on my machine so if any device connects to my network it can access the NodeJS app thought its browser using domain URL http://myserver.app/
我要问什么-请逐步指导我如何在我的机器上升级 DNS 或 mDNS,这样如果任何设备连接到我的网络,它就可以访问 NodeJS 应用程序,认为它的浏览器使用域 URL
http://myserver.app/
I am using nodeJS@16.13.2
, express@4.17.2
, Windows 11 version 21H2 build 22000.376
我正在使用
nodeJS@16.13.2
, express@4.17.2
, Windows 11 version 21H2 build 22000.376
My Network is like I have connected my mobile hotspot to laptop and any new device to connected to hotspot so may my mobile is kind of a wifi router.我的网络就像我已经将我的移动热点连接到笔记本电脑以及任何连接到热点的新设备,所以我的手机可能是一种 wifi 路由器。
if a different laptop connects to my hotspot i should be able to access the website using the domain name.如果另一台笔记本电脑连接到我的热点,我应该能够使用该域名访问该网站。
myserver.app
My Phone is using Android 11
and please do consider I do not want to use any online DNS providers like easyDns or AWS i want a local solution which i can run on my laptop我的手机正在使用
Android 11
,请考虑我不想使用任何在线 DNS 提供商,如 easyDns 或 AWS 我想要一个可以在我的笔记本电脑上运行的本地解决方案
Starting with Android 9 Pie it is possible to change DNS globally, provided they support TLS.从 Android 9 Pie 开始,可以全局更改 DNS,只要它们支持 TLS。 Just go in
只需 go 在
Settings → Network & internet → Advanced → Private DNS设置 → 网络和互联网 → 高级 → 私有 DNS
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.