啊啊啊小孔 2016-01-02 16:30
浏览 27
已采纳

在Phusion Passenger后面运行Go Web服务器

Phusion Passenger has a great ecosystem for running webapps behind a webserver. I have experience with it from Ruby and Node.js apps. Now I rewrote a webservice to use Go, and it's time to deploy it. It seems natural to put Passenger+Nginx in front of the go webserver (using net/http). Searching around it seems that nobody has tried this, or asked about this anywhere...

I can't seem to find a configuration option to attach a custom binary, instead of passenger_ruby/passenger_node etc.

Can (should?) I use Phusion Passenger to run my binary created using go build?

  • 写回答

1条回答 默认 最新

  • dongqing8765 2016-01-02 16:50
    关注

    No, you can't. Passenger doesn't actually use HTTP internally; it uses a custom protocol (like FastCGI or SCGI but incompatible with both) to communicate with your app and requires its own code in the application for management and dispatching requests. They don't provide such support code for Go.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿