How to force Typesafe Activator to listen 0.0.0.0:8888

久未见 提交于 2019-12-03 16:14:33

问题


I recently installed Typesafe Activator to a VM. Applications created by activator can be accessed after port forwarding, but Activator seems to listen localhost. How to change this to WAN?


回答1:


It looks like setting system properties http.address and http.port will now do this job, e.g.

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

Would launch Activator on a WAN on port 80 (assuming matching permissions, etc).




回答2:


It is hardcoded right now and there's no way to change short of recompiling from source. https://github.com/typesafehub/activator/blob/master/ui/app/activator/UIMain.scala#L99

Maybe we could prefix this with if (System.getProperty("http.address") == null) File an issue on github?

Update: this is now fixed so that -Dhttp.address works (and above source link no longer goes to the right place)




回答3:


Base on Michael Nash's answer, but should be

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

for version 1.2.10



来源:https://stackoverflow.com/questions/18234466/how-to-force-typesafe-activator-to-listen-0-0-0-08888

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!