V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
frank1256
V2EX  ›  程序员

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

  •  
  •   frank1256 · 5 天前 · 512 次点击

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

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

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

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