[英]How to change the IP address of Wildfly server
I have a wildfly 10 running on localhost:8085, containing inside a servlet which will return some result data when a client sending request for it. 我有一个在localhost:8085上运行的wildfly 10,其中包含一个servlet,当客户端发送请求时,它将返回一些结果数据。 When I test with my web browser on my local computer, it works fine.
当我在本地计算机上使用Web浏览器进行测试时,它可以正常工作。 Now I would like to use an external device, for example RaspberryPi to send request to this servlet.
现在,我想使用外部设备(例如RaspberryPi)将请求发送到此servlet。 How can I change IP address of the Wildfly server from localhost to maybe the IP address of my computer so that my RaspberryPi can send request to.
如何将Wildfly服务器的IP地址从localhost更改为计算机的IP地址,以便我的RaspberryPi可以向其发送请求。 Thank you
谢谢
Either change the IP directly in the wildfly configuration ( standalone.xml
or whatever your config profile is) within 可以直接在wildfly配置(
standalone.xml
或任何配置文件中)中更改IP
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
</interface>
....
</interfaces>
or specify the bind address as startup parameter: 或将绑定地址指定为启动参数:
standalone.sh -b=0.0.0.0
or standalone.sh -Djboss.bind.address=0.0.0.0
或
standalone.sh -Djboss.bind.address=0.0.0.0
Note that 0.0.0.0
will force JBoss bind to all network adapters, you can also specify the exact IP like 192.168.0.23
请注意,
0.0.0.0
将强制JBoss绑定到所有网络适配器,您也可以指定确切的IP,例如192.168.0.23
For more info, look at Wildfly docs 有关更多信息,请参阅Wildfly文档
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.