Homestead YAML 目录
Homestead YAML Directory
我的 Homestead VM 目录有问题。我的 homestead.yaml 文件具有以下 folder/sites 设置:
folders:
- map: ~/web/sites
to: /home/vagrant/web
sites:
- map: test.app
to: /home/vagrant/web/test/public
它们都在同一个根目录 (F:) 中,当我通过 SSH 进入 VM 并使用 "dirs" 命令时,我没有在其中看到任何文件夹。谢谢!
更新:
文件同步现在工作正常,我可以在 VM 目录中看到我的 files/folders。现在,我的问题是 IP 路由。在我的主机文件中,我输入了位于 YAML 文件顶部的 IP(见下文),但是当我转到 test.app:8000 时,出现了最后一张图片中显示的错误。我的项目在主机上的文件路径是 C:/users/matt/web/sites/test,它与 homestead 文件夹位于同一根目录。非常感谢您的帮助。谢谢!
Without options, dirs displays the list of currently remembered
directories. The default display is on a single line with directory
names separated by spaces. Directories are added to the list with the
pushd command; the popd command removes entries from the list.
因此,除非您将目录推送到列表,否则它们不会出现。
您应该能够访问 /home/vagrant/web
并在那里查看您的内容
案例结束,我以某种方式为原始主机文件创建了一个单独的 .txt 文件。所以,我以为我正在编辑正确的主机文件,但事实并非如此。
我的 Homestead VM 目录有问题。我的 homestead.yaml 文件具有以下 folder/sites 设置:
folders:
- map: ~/web/sites
to: /home/vagrant/web
sites:
- map: test.app
to: /home/vagrant/web/test/public
它们都在同一个根目录 (F:) 中,当我通过 SSH 进入 VM 并使用 "dirs" 命令时,我没有在其中看到任何文件夹。谢谢!
更新:
文件同步现在工作正常,我可以在 VM 目录中看到我的 files/folders。现在,我的问题是 IP 路由。在我的主机文件中,我输入了位于 YAML 文件顶部的 IP(见下文),但是当我转到 test.app:8000 时,出现了最后一张图片中显示的错误。我的项目在主机上的文件路径是 C:/users/matt/web/sites/test,它与 homestead 文件夹位于同一根目录。非常感谢您的帮助。谢谢!
Without options, dirs displays the list of currently remembered directories. The default display is on a single line with directory names separated by spaces. Directories are added to the list with the pushd command; the popd command removes entries from the list.
因此,除非您将目录推送到列表,否则它们不会出现。
您应该能够访问 /home/vagrant/web
并在那里查看您的内容
案例结束,我以某种方式为原始主机文件创建了一个单独的 .txt 文件。所以,我以为我正在编辑正确的主机文件,但事实并非如此。