简体   繁体   中英

How can I reach Amazon Linux in Hyper-V

I hava Amazon Linux 2 running in a Hyper-V Virtual Machine, I have Wildfly running on it, so when I put

curl http://localhost:8080

在此处输入图像描述 It returns an html page as plain text, which is expected, now I want to reach the wildfly instance (running on 8080 port) but when I try to reach it through a browser in windows host, it refuses to connect.

在此处输入图像描述

is there a configuration inside Amazon Linux in order to be reachable by other browsers?

I was trying to reach wildfly21 without modifiying the following parameters in standalone.xml:

    <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:0.0.0.0}"/>
      </interface>
    </interfaces>

Those are the values I was looking for, 0.0.0.0 to make wildfly reachable for anyone, also you can make reachable the console too. Amazon Linux doesn't have a Firewall or something like that, the internal IP address works fine since it's a VM.

For the ssh login this worked for me:

nano /etc/ssh/sshd_config    

PasswordAuthentication yes    

service sshd restart

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