dpztth71739 2017-01-30 13:24
浏览 237
已采纳

如何在专用服务器上运行多个Golang应用程序? [关闭]

I'm a Go newbie and I'm stuck trying to figure out how to deploy my apps on a dedicated server.

When I worked with PHP I used the standard setup:

Apache and PHP diagram

But I'm confused as to how I'm supposed to deploy my Go apps.

I know I can run a single app on port :80 but how do I run multiple apps?

Is this the general idea:

Multiple apps diagram

Or should I be using something like this:

Nginx diagram

Can someone clarify the way most Go developers deploy their apps? Thanks!

  • 写回答

3条回答 默认 最新

  • dongxunhua2054 2017-01-30 13:50
    关注

    I'd highly recommend going with Caddy. You can set up you server with all the apps on different ports (esp. higher ports i.e. 1024 and up, so they don't need to be root), and then use proxy directives to forward traffic to your apps and such. As a bonus, you also then get free Let's Encrypt certificate support!

    https://caddyserver.com/docs/proxy for more on the proxy directive

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 请问这个是什么意思?
  • ¥15 STM32驱动继电器
  • ¥15 Windows server update services
  • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏
  • ¥15 模糊pid与pid仿真结果几乎一样
  • ¥15 java的GUI的运用
  • ¥15 我想付费需要AKM公司DSP开发资料及相关开发。
  • ¥15 怎么配置广告联盟瀑布流
  • ¥15 Rstudio 保存代码闪退
  • ¥20 win系统的PYQT程序生成的数据如何放入云服务器阿里云window版?