使用Elastic IP在Amazon EC2上访问WT



i源代码编译了EC2的微型实例上的最新WT,并运行Ubuntu当我午餐时,其中一个例子:

1:23:15.~/progs/wt-3.2.3-rc1/examples/widgetgallery
>../../build/examples/widgetgallery/widgetgallery.wt --docroot . --http-address localhost --http-port 8080
[2012-Oct-25 01:23:16.898953] 969 - [info] "config: reading Wt config file: /etc/wt/wt_config.xml (location = '../../build/examples/widgetgallery/widgetgallery.wt')"
[2012-Oct-25 01:23:16.901653] 969 - [info] "WServer/wthttp: initializing built-in wthttpd"
[2012-Oct-25 01:23:16.902948] 969 - [info] "wthttp: started server: http://localhost:8080"

http://54.243.50.12:8080/http://54.243.50.12/放入Chrome的地址栏时,我无法访问它。它一直在加载,再也找不到。

弹性IP的关联工作。我可以用油灰连接到54.243.50.12。

如果我尝试在启动WT时尝试指定弹性IP,则WT服务器不会启动:

1:31:45.~/progs/wt-3.2.3-rc1/examples/widgetgallery
>../../build/examples/widgetgallery/widgetgallery.wt --docroot . --http-address 54.243.50.12 --http-port 8080
[2012-Oct-25 01:31:53.696951] 1056 - [info] "config: reading Wt config file: /etc/wt/wt_config.xml (location = '../../build/examples/widgetgallery/widgetgallery.wt')"
[2012-Oct-25 01:31:53.699035] 1056 - [info] "WServer/wthttp: initializing built-in wthttpd"
[2012-Oct-25 01:31:53.699968] 1056 - [error] "wthttp: Error occurred when binding to 54.243.50.12:8080
bind: Cannot assign requested address"
[2012-Oct-25 01:31:53.700614] 1056 - [info] "WServer/wthttp: fatal: Error (asio): bind: Cannot assign requested address"
1:31:53.~/progs/wt-3.2.3-rc1/examples/widgetgallery
>

没有弹性IP,那是同一故事。

8080端口开放:

>netstat -an | grep "LISTEN "
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN
tcp        0      0 127.0.0.1:5432          0.0.0.0:*               LISTEN
tcp6       0      0 :::22                   :::*                    LISTEN

我在http://redmine.webtoolkit.eu/boards/2/topics/4484#message-4516中完成了所有这些工作。

我需要在安全组中打开一个端口> Inbound

最新更新