我installed Homestead并且一切似乎都正常运行,但我的项目总是在localhost:8000上提供,尽管Homestead.yaml中的IP地址设置为默认值" 192.168.10.10" :
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Code
to: /home/vagrant/Code
sites:
- map: homestead.app
to: /home/vagrant/Code/Laravel/public
当我去homestead.app时,我看到了#Apache2 Ubuntu默认页面'。这里有什么矛盾吗?
我的/ etc / hosts:
192.168.10.10 homestead.app
127.0.0.1 localhost
127.0.1.1 ubuntu-machine
# 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
我在每次更改后都使用了vagrant up --provision
我在Ubuntu 17.04上使用Homestead v5.1.0。