国产+高潮+在线,国产 av 仑乱内谢,www国产亚洲精品久久,51国产偷自视频区视频,成人午夜精品网站在线观看

使用web-msg-sender如何隱藏url中的端口號?

jingzhongwa

http://demos.workerman.net:2121/?type=publish&to=&content=content
請教大神,怎么隱藏各種接口url里的端口號?

3064 1 1
1個回答

phpcreeper

不知道這個端口隱藏是什么意義上的隱藏? 假設(shè)對外只暴露域名為: http://demo.workerman.net?,那就得上nginx代理轉(zhuǎn)發(fā)到特定的端口如2121即可。
?

  • jingzhongwa 2019-02-21

    在web推送框架中,涉及3個端口,http://demos.workerman.net:2121 、http://demos.workerman.net:2120 和http://demos.workerman.net:2123,要引用3個端口的話,使用http://demos.workerman.net這個域名單靠nginx配置行不通吧? nginx不知道對于同一個http://demos.workerman.net訪問,到底是走2120、2121還是2123呀?

  • phpcreeper 2019-02-21

    既然是:訪問同一個域名 + 區(qū)分不同的端口 + 隱藏端口,那ngnix可以這樣做:
    location /server1/ {
    proxy_pass http://x.x.x.x:2120;
    }

    location /server2/ {
    proxy_pass http://x.x.x.x:2121;
    }

    以此類推

  • jingzhongwa 2019-02-22

    原來還可以這樣配置,多謝指點,有空試試

年代過于久遠,無法發(fā)表回答
??