简体   繁体   中英

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. When I test with my web browser on my local computer, it works fine. Now I would like to use an external device, for example RaspberryPi to send request to this 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. Thank you

Either change the IP directly in the wildfly configuration ( standalone.xml or whatever your config profile is) within

<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

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

For more info, look at Wildfly docs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM