英文:
Unable to access flight-review software on AWS EC2 instance
问题
我已经在AWS EC2实例上设置了并安装了必要的软件包以运行航班评论软件。然而,我无法访问EC2实例上的航班评论软件。
我尝试在EC2实例上运行以下命令:
./serve.py --show
但它没有任何响应。当我运行以下命令:
sudo bokeh serve serve.py --port 5006
它指示服务器正在5006端口上运行。然而,当我尝试访问URL http://localhost:5006/serve 时,无法访问该站点。
另外,当我打开EC2实例的公共IP地址时,它显示了一个 "It Works!" 消息,而不是航班评论软件。
我预期在EC2实例上运行命令 ./serve.py --show
将在新页面中打开航班评论软件,类似于在我的本地系统上的运行方式。我也预期访问URL https://localhost:5006/serve 将显示航班评论软件。然而,这两个预期都没有实现,我不确定如何解决这个问题。
当我同时运行以下命令:
./serve.py --show
和
curl http://localhost:5006
它会打印文件的HTML内容。
英文:
I have set up an AWS EC2 instance and installed the necessary packages to run the flight-review software. However, I am unable to access the flight-review software on the EC2 instance.
I tried running the command
`./serve.py --show`
on the EC2 instance, but it doesn't give any response.When I ran
sudo bokeh serve serve.py --port 5006,
it indicated that the server is running on port 5006. However, when I try to access the URL http://localhost:5006/serve, the site cannot be reached.
Additionally, when I open the EC2 instance's public IP address, it shows a "It Works!" message instead of the flight-review software.
I expected that running the command ./serve.py --show on the EC2 instance would open the flight-review software in a new page, similar to how it works on my local system. I also expected that accessing the URL https://localhost:5006/serve would display the flight-review software. However, neither of these expectations were met, and I am unsure of how to resolve this issue.
when i run
./serve.py --show
and
curl http://localhost:5006
simultaneously it prints the html content of the file.
答案1
得分: 1
由于您的服务正在端口5006上运行,您需要在安全组上添加一个入站规则,以允许端口5006上的入站流量。
然后,您可以访问该服务:
http://1.2.3.4:5006/serve
(其中1.2.3.4
应替换为实际的公共IP地址)
如果修改/etc/nginx/sites-available/default
文件,将其运行在默认的HTTP端口80上可能会更方便。然后,您可以通过以下方式访问该站点:
http://1.2.3.4/serve
英文:
Since your service is running on port 5006, you will need to add an Inbound rule on the Security Group to allow inbound traffic on port 5006.
You could then access the service on:
http://1.2.3.4:5006/serve
(where 1.2.3.4
should be replaced with the actual public IP address)
It might be more convenient to run it on default HTTP port 80 by modifying the /etc/nginx/sites-available/default
file. You could then access the site via:
http://1.2.3.4/serve
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论