1

我已经在数字海洋(Ubuntu)中安装了 playframework 并安装了激活器 UI。UI 位于 http://127.0.0.1:8888,但是我无法从 Internet 访问此端口。即说我的 digitalocean 服务器 IP 是 10.100.10.10,我无法从我的个人 PC 访问 http://10.100.10.10:8888

但是我可以在服务器中使用 localhost,知道如何从 Internet 访问此页面吗?

wget http:// 127.0.0.1:8888
--2014-04-16 16:01:38--  http:// 127.0.0.1:8888/
Connecting to 127.0.0.1:8888... connected.
HTTP request sent, awaiting response... 303 See Other
Location: /home [following]
--2014-04-16 16:01:38--  http:// 127.0.0.1:8888/home
Reusing existing connection to 127.0.0.1:8888.
HTTP request sent, awaiting response... 200 OK

sudo netstat -ntulp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      429/sshd        
tcp6       0      0 :::22                   :::*                    LISTEN      429/sshd        
tcp6       0      0 127.0.0.1:8888          :::*                    LISTEN      17498/java      
tcp6       0      0 :::28667                :::*                    LISTEN      17498/java 
4

1 回答 1

2

我找到了解决方案,这是由于服务被迫监听 127.0.0.1,下面的设置可以解决并在端口 80 上的 WAN 上启动 Activator

./activator -Dhttp.address=0.0.0.0 -Dhttp.port=80

于 2014-04-17T03:59:21.207 回答