V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
wisetc
V2EX  ›  程序员

你们公司会为前端配服务器吗

  •  
  •   wisetc · 2019-05-17 17:17:12 +08:00 · 2203 次点击
    这是一个创建于 1777 天前的主题,其中的信息可能已经有所发展或是发生改变。

    假设有一台服务器,只有一个端口,域名也只有一个,怎么同时部署多个服务,供外网访问,假设防火墙不能新开一个端口的话。

    10 条回复    2019-05-17 17:56:21 +08:00
    zgcwkj
        1
    zgcwkj  
       2019-05-17 17:31:28 +08:00
    二级域名
    LeeSeoung
        2
    LeeSeoung  
       2019-05-17 17:33:28 +08:00
    nginx 根据 path 路由
    chniccs
        3
    chniccs  
       2019-05-17 17:33:32 +08:00
    只能通过域名了
    opengps
        4
    opengps  
       2019-05-17 17:40:41 +08:00
    二级域名
    前端 www.
    后端 api.
    shawshi
        5
    shawshi  
       2019-05-17 17:48:22 +08:00
    二级域名+nginx
    pmispig
        6
    pmispig  
       2019-05-17 17:49:31 +08:00
    dreamusername
        7
    dreamusername  
       2019-05-17 17:52:57 +08:00
    显然是 nginx,全是顶级域名都没关系,nginx 接管端口,然后根据 server_name 自动分配路径
    turi
        8
    turi  
       2019-05-17 17:55:14 +08:00
    1、2 楼正解
    exip
        9
    exip  
       2019-05-17 17:55:37 +08:00
    楼上说的很全了二总结下:级域名+nginx 根据 path 路由
    exip
        10
    exip  
       2019-05-17 17:56:21 +08:00
    楼上说的很全了总结下:二级或三级域名+nginx 根据 path 路由
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1549 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 17:04 · PVG 01:04 · LAX 10:04 · JFK 13:04
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.