我该如何在我的公共领域对AWS Lightsail Docker容器进行get请求
我有一个链接下面分配给我当前的Aws Lightsail Docker容器,例如:
https:// project-name .xxxxxxxxxxxxxxxxxxxxxxxx x.us-west-west-west-west-cs.cs.amazonlightsail.com/
我允许在Docker Blask API和AWS Lightsail容器上启用端口5000。 我想在端口5000上执行get请求,以从某个子域请求数据。
我打电话给本地主机API的方式是通过 127.0.0.1:5000/subject/number
因此,我认为我将API公共领域称为这样:
https:// project-name .xxxxxxxxxxxxxxxxx。 us-west-2.cs.amazonlightsail.com:5000/subject/number
我把港口和子域放在AWS域的正确位置吗?
I have a link below that was assigned to my current AWS lightsail Docker Container such as:
https://project-name.xxxxxxxxxxxxx.us-west-2.cs.amazonlightsail.com/
I allowed port 5000 to be enabled on my docker flask api and on my AWS lightsail container.
I want to do a GET Request on port 5000 to request the data from a certain subdomain.
The way I called the local host api was through
127.0.0.1:5000/subject/number
Therefore I was thinking I would call the API Public Domain like this:
https://project-name.xxxxxxxxxxxxx.us-west-2.cs.amazonlightsail.com:5000/subject/number
Am I putting the port and subdomain in the correct place for the AWS domain?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,您做得正确。在我看来,如果它不起作用,它与URL无关,而与您的安全规则无关。确保您已公开暴露的端口5000。
Yes, You are doing it correctly. It seems to me that if it is not working, it has nothing to do with the url, but rather with your security rules. Make sure you have publicly exposed port 5000.