我的目标我的服务器通过http://10.12.135.57:2828/
我现在可以通过以下两种方式访问我的服务器:
http://本地主机:2828
http://127.0.0.1:2828
IP 配置结果ifconfig | grep inet
inet 10.12.135.57 netmask 255.255.255.0 broadcast 10.12.135.255
inet6 fe80::add2:1119:8cdc:cc2a prefixlen 64 scopeid 0x20<link>
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
inet 10.12.135.57 netmask 255.0.0.0
输出cat /etc/hosts
:
127.0.0.1 localhost
127.0.1.1 ravijks-OptiPlex-9020
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Firewall
$ sudo ufw disable
Firewall stopped and disabled on system startup
$ sudo ufw status
Status: inactive