gpt4 book ai didi

node.js - AWS elastic beanstalk 上的默认代理配置将请求转发到的 Web 应用程序的端口号是多少?

转载 作者:行者123 更新时间:2023-12-04 17:21:18 28 4
gpt4 key购买 nike

困惑发生在 this pag e 在“反向代理配置”下已经提到了:

By default, Elastic Beanstalk configures the proxy to forward requests coming in on port 80 to your main web application on port 5000.

然后 this page它是这样提到的:

By default, Elastic Beanstalk configures the proxy to forward requests to your application on port 8080.

那么请求转发到的默认端口是 5000 端口还是 8080 端口?

最佳答案

Amazon Linux 2 上是 8080。您可以通过检查 EB 实例上的默认 nginx 设置来检查它:

cat /etc/nginx/conf.d/elasticbeanstalk/00_application.conf 

location / {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;

proxy_set_header Connection $connection_upgrade;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}

5000 可能来自 Amazon Linux 1,不确定。

关于node.js - AWS elastic beanstalk 上的默认代理配置将请求转发到的 Web 应用程序的端口号是多少?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66074722/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com