在什么情况下,人们是否应该仅将Node.js用作实际部署中的服务器?
当一个人不希望只使用Node.js的,有什么用Node.js的发挥更好?Apache还是Nginx?
我今天遇到了一个问题,突然间我的Elastic Beanstalk应用程序将我发送到了一个502 Bad Gateway页面.现在我遇到过这个问题,之所以发生这种情况,是因为Node命令无法启动我的服务器.我通过输入Node command: node main.js来解决这个问题,直到今天早上我都没有遇到这个问题.突然它停止工作,我在错误日志中收到此错误:
2015/03/31 13:07:17 [error] 697#0: *519 connect() failed (111: Connection refused) while connecting to upstream, client: 54.146.12.189, server: , request: "HEAD / HTTP/1.1", upstream: "http://127.0.0.1:8081/", host: "54.152.12.19"
2015/03/31 13:07:17 [error] 697#0: *521 connect() failed (111: Connection refused) while connecting to upstream, client: 54.146.18.189, server: , request: "GET /clientaccesspolicy.xml HTTP/1.1", upstream: "http://127.0.0.1:8081/clientaccesspolicy.xml", host: "54.152.12.19"
2015/03/31 13:16:02 [error] 697#0: *523 connect() failed (111: Connection refused) while connecting to upstream, client: 69.204.65.1321, server: …Run Code Online (Sandbox Code Playgroud)