我使用yo生成器(生成器-moda),运行在一个ec2实例上,并希望从我的浏览器导航到外部url,但我的浏览器只是挂起连接.
是否需要在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发布于 2015-04-18 11:14:59
问题是,172.31.0.0/16是亚马逊的私有IP范围,所以您不能在VPC () 来源之外访问它们。
如果您想连接到代码正在运行的EC2实例,您需要做两件事:
3000和3001。然后,在浏览器中,用正确的端口复制第一步获得的公共DNS主机名,您应该能够加载页面。
https://stackoverflow.com/questions/29706370
复制相似问题