【问题标题】:Meteor NGinx Bad GatewayMeteor NGinx 坏网关
【发布时间】:2015-06-30 02:20:46
【问题描述】:

他,

我正在使用 NGinX 在 nodeJs 上运行 MeteorJS 设置。 当我访问网站时,没有任何问题。

当 Google 尝试访问它时,没有返回任何内容,并且我看到我的 access.log 读取了 Bad Gateway 错误。

我尝试过 spiderable 和 lufrai 的 spiderable 版本,但这也无济于事。 我的 NGinX 有 websocket 活动,所以也不是......

有人能指出我正确的方向吗?

服务器块

server {
   listen 80;

   server_name $name;
   root $rootDir;

   passenger_enabled on;
   passenger_sticky_sessions on;
}

即使是 PhantomJS 也已安装并且在正确的路径中。

【问题讨论】:

  • 请包含任何相关代码:您的 nginx server 至少阻塞(我对 Meteor 一无所知)
  • 你安装了phantomjs吗?我认为它是可蜘蛛的
  • 如上所述,phantomJS 安装在正确的路径目录中,并且我已经包含了我的服务器块。

标签: node.js nginx meteor


【解决方案1】:

尝试将此位置块添加到服务器块:

server {
   listen 80;

   server_name $name;
   root $rootDir;

   passenger_enabled on;
   passenger_sticky_sessions on;

   location / {
        proxy_pass http://localhost:PORT;
        proxy_http_version 1.1;
   }
}

【讨论】:

  • 感谢您的帮助 k.chao.0424,不幸的是它对我没有任何帮助。会不会是因为应用程序在负载均衡器后面??
  • 你的/usr/local/nginx/conf/nginx.conf中有什么东西吗?
  • 这是一个很长的镜头,但是您是否在编辑配置后重新加载了您的 nginx? sudo nginx -s reload
  • 不,我的本地用户中什至没有那个 nginx 路由,我只是尝试重新加载它,但结果保持不变.. [alert] 2967#0: *2329 768 worker_connections 不够连接到上游时,客户端:127.0.0.1,服务器:staging.veluwseheksen.nl,请求:“HEAD / HTTP/1.1”,上游:“127.0.0.1:80”,主机:“localhost”
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2014-06-18
  • 2014-01-25
  • 2017-06-23
  • 2019-10-03
  • 2020-11-12
  • 2021-03-29
  • 2019-06-07
相关资源
最近更新 更多