我正在使用yo生成器(generator-moda),在ec2实例上运行,并希望从我的浏览器导航到提供的外部网址,但我的浏览器只是挂起连接...
是否需要在ec2安全组中进行特殊的配置调整,否则允许下面的ip或主机?
[BS] Access URLs:
-------------------------------------
Local: http://localhost:3000
External: http://172.31.60.85:3000
-------------------------------------
UI: http://localhost:3001
UI External: http://172.31.60.85:3001
-------------------------------------
[BS] Serving files from: ./app
[17:52:19] gulp-inject 12 files into main.scss.
[17:52:19] gulp-inject 12 files into main.scss.
[17:52:19] Starting 'html'...
[17:52:19] Finished 'html' after 3.89 ms
[BS] 1 file changed (index.html)
INFO [karma]: Karma v0.12.31 server started at http://localhost:9876/
INFO [launcher]: Starting browser PhantomJS
WARN [watcher]: Pattern "/home/ubuntu/dev/clients/alugha/main/app/scripts/**/*.html" does not match any file.
INFO [PhantomJS 1.9.8 (Linux)]: Connected on socket f08K4dCRmBorILmZgofR with id 91726259
答案 0 :(得分:4)
问题是172.31.0.0/16
是亚马逊的私有IP范围,因此您无法在VPC(亚马逊虚拟私有云)source之外访问它们。
如果要连接到运行代码的EC2实例,则需要做两件事:
3000
和3001
。然后在浏览器中复制第一步使用正确端口获得的公共DNS主机名,您应该可以加载页面。