部署 请教大家关于 Unicorn 启动问题

ghn645568344 · May 02, 2017 · Last by marksloan replied at May 05, 2017 · 1347 hits

现在项目是用的 NGINX 做的反向代理,但单独访问 unicorn 启动的端口 也是可以访问页面的 现在想请教大家:

  1. 怎么能限制,只通过 Nginx 的端口进行访问
  2. unicorn 能只启动内网 IP 访问吗?

bind 127.0.0.1 or unix socket

unicorn 启动时不开启 tcp 端口

你 unicorn 绑定 socket 文件而不是端口,就可以了,性能比 tcp port 还高。nginx upstream 里面读取 unicorn socket 文件的路径。

You need to Sign in before reply, if you don't have an account, please Sign up first.