• 请不要在回答技术问题时复制粘贴 AI 生成的内容
frank1256
V2EX  ›  程序员

求问域名解析,用啥实现内网域名能够转发到 ip:端口呢?

  •  
  •   frank1256 · Oct 17, 2025 · 1837 views
    This topic created in 382 days ago, the information mentioned may be changed or developed.

    在内网里,比如 192.168.1.100:8080 想映射到 http://helloworld

    dns 我知道可以直接映射域名,但是这个端口咋转发, 有大佬知道有什么开源的工具之类吗?可视化之类的管理最好了。

    是要先域名解析,然后套一层 nginx 类似的端口转发吗?那样不都是同一个域名,只不过 path 不一样,我想要的是每个都有独立域名。搞不明白🥲

    haozheliu
    haozheliu
    Oct 17, 2025
    1
    要简单的就 nginx 就可以啊,locate 让不同域名设置规则,转到不同的 ip 和端口
    NouveauNom
    NouveauNom
    Oct 17, 2025
    2
    远程映射( Map Remote )
    gtese
    gtese
    Oct 17, 2025
    3
    先确定有公网 ip ,没有的话用 ddns , 在防火墙或路由器里做 nat 。 不同域名共用 ip 是用主机头实现。nginx 比较推荐。
    andrei007
    andrei007
    Oct 17, 2025
    4
    域名只能转发到 ip 上,转不到指定端口;
    只能套 Nginx ;
    Nginx 这种一般都支持虚拟主机,就是同一个 ip 不同域名;
    haozheliu
    haozheliu
    Oct 17, 2025
    5
    http 不声明就是 80 ,nginx 监听 80 再转。也可以在链接里就写上端口 http://helloworld:8080
    frank1256
    frank1256
    OP
    Oct 17, 2025
    6
    @haozheliu
    @andrei007
    明白了,傻了,多域名都映射同一个 nginx 就行了。。。
    chendaye
    chendaye
    Oct 17, 2025
    7
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1348 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 20:57 · PVG 04:57 · LAX 12:57 · JFK 15:57
    ♥ Do have faith in what you're doing.