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

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

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

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

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

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

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