我收到了这条消息
connect() failed (111: Connection refused
Run Code Online (Sandbox Code Playgroud)
这是我的日志:
-------------------------------------
/var/log/nginx/error.log
-------------------------------------
2018/10/21 06:16:33 [error] 4282#0: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.4.119, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8081/", host: "hackingdeal-env.qnyexn72ga.ap-northeast-2.elasticbeanstalk.com"
2018/10/21 06:16:33 [error] 4282#0: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 172.31.4.119, server: , request: "GET /favicon.ico HTTP/1.1", upstream: "http://127.0.0.1:8081/favicon.ico", host: "hackingdeal-env.qnyexn72ga.ap-northeast-2.elasticbeanstalk.com", referrer: "http://hackingdeal-env.qnyexn72ga.ap-northeast-2.elasticbeanstalk.com/"
Run Code Online (Sandbox Code Playgroud)
我正在使用 nodejs/express Elastic Beanstalk 环境。
我有一个 nginx 相关文件
.ebextensions/nginx/conf.d/proxy.conf
Run Code Online (Sandbox Code Playgroud)
上层文件包含:
client_max_body_size 50M;
Run Code Online (Sandbox Code Playgroud)
每当我尝试获取我的网页时,我都会收到 502 错误的网关。
我的应用程序有什么问题?
nginx amazon-web-services node.js express amazon-elastic-beanstalk
我用mac和我安装了gatsby-cli:
npm install --global gatsby-cli
Run Code Online (Sandbox Code Playgroud)
和'npm root -g'命令打印:
/usr/local/lib/node_modules/npm/lib/node_modules
Run Code Online (Sandbox Code Playgroud)
npm成功安装了gatsby但是,我无法运行gatsby命令(gatsby --version,gatsby --help)每当我键入并运行"gatsby --version"时它会打印:
-bash: gatsby: command not found
Run Code Online (Sandbox Code Playgroud)
有什么办法可以解决这个问题吗?