- win10上装的homestead;
-
aaa.test
域名,想让局域网内的别人也访问到; - 根据网上的教程 改
public_network
和同一IP段的IP10.8.220.12
; - 本机改完
hosts
可以访问aaa.test
; - 局域网内其他电脑改完
hosts
文件后 无法访问; - 而且IP也ping不通;
win10:
Ethernet adapter VirtualBox Host-Only Network:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::c02b:a17b:c92e:b45b%3
Autoconfiguration IPv4 Address. . : 169.254.180.91
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :
Ethernet adapter VirtualBox Host-Only Network #2:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::d054:8abc:18ec:f421%8
IPv4 Address. . . . . . . . . . . : 192.168.10.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
Ethernet adapter 以太网:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::5ac:6bd5:2a2d:3137%9
IPv4 Address. . . . . . . . . . . : 10.8.220.237
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 10.8.220.1
虚拟机:
vagrant@homestead:~$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.2.15 netmask 255.255.255.0 broadcast 10.0.2.255
inet6 fe80::a00:27ff:fef0:d6cc prefixlen 64 scopeid 0x20<link>
ether 08:00:27:f0:d6:cc txqueuelen 1000 (Ethernet)
RX packets 7403 bytes 1256971 (1.2 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 5213 bytes 598032 (598.0 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.8.220.12 netmask 255.255.255.0 broadcast 10.8.220.255
inet6 fe80::a00:27ff:fece:2c45 prefixlen 64 scopeid 0x20<link>
ether 08:00:27:ce:2c:45 txqueuelen 1000 (Ethernet)
RX packets 9801 bytes 644909 (644.9 KB)
RX errors 0 dropped 3 overruns 0 frame 0
TX packets 140 bytes 97322 (97.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 502 bytes 153873 (153.8 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 502 bytes 153873 (153.8 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions
1.查看自己的
ip
,以及网关2.设置
homestead
配置在 Homestead 目录下面的 homestead.yaml:
3.重启 homestead