Homestead 多个站点和 nginx 不工作
Homestead multiple sites and nginx not working
我一直在一个 Homestead 虚拟机上处理多个站点,但刚开始遇到问题。工作正常,直到我尝试在没有互联网连接的情况下工作。现在无论有无互联网连接,我都会遇到这些问题。
我已经阅读了很多与这些问题相关的主题,但还没有找到解决方案。
我的主机文件:
192.168.10.10 homestead.app
192.168.10.10 nathan.app
192.168.10.10 ssiweb.app
192.168.10.10 test1.app
192.168.10.10 login.app
192.168.10.10 login2.app
192.168.10.10 photogallery.app
Homestead.yaml
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
folders:
- map: c:/users/nathan/desktop/www
to: /home/vagrant/Code
sites:
- map: homestead.app
to: /home/vagrant/Code/Project/public
- map: nathan.app
to: /home/vagrant/Code/Project1/public
- map: ssiweb.app
to: /home/vagrant/Code/Project2_ssiweb/public
- map: test1.app
to: /home/vagrant/Code/Project3_composer/public
- map: login.app
to: /home/vagrant/Code/Proj4_login/public
- map: login2.app
to: /home/vagrant/Code/Proj5_login_expanded/public
- map: photogallery.app
to: /home/vagrant/Code/Project6_photo_gallery/public
databases:
- homestead
- ssiweb
variables:
- key: APP_ENV
value: local
第一个问题是我无法 "Project6..." 进行配置。将其添加到主机文件后,homestead.yaml 我会转到浏览器,photogallery.app 会打开 homestead.app 的文件。我试过 vag运行t halt,vag运行t up --provision,重新启动软管计算机,等等。无法让它工作。现在我在做 vag运行t up 时遇到以下错误...
Job for nginx.service failed. See "systemctl status nginx.service" and "journalctl -xe" for details.
==> default: Job for php7.0-fpm.service failed. See "systemctl status php7.0-fpm.service" and "journalctl -xe" for details.
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
然后我备份了数据库并销毁了盒子和 运行vag运行t,但问题仍然存在。接下来要解决什么问题?如何查看这些...
See "systemctl status php7.0-fpm.service" and "journalctl -xe" for details.
这是因为你已经升级了 laravel/homestead 盒子(vagrant box),但是没有升级来自存储库的 shell 脚本 laravel/homestead(https://github.com/laravel/homestead)。
新发布的 vagrant box 与旧脚本之间存在一些不一致。
只需再次克隆 repo,运行 vagrant provision
应该可以正常工作。
(不要忘记备份您的 Homestead.yaml 文件。否则,您将丢失您的站点条目。)
我一直在一个 Homestead 虚拟机上处理多个站点,但刚开始遇到问题。工作正常,直到我尝试在没有互联网连接的情况下工作。现在无论有无互联网连接,我都会遇到这些问题。
我已经阅读了很多与这些问题相关的主题,但还没有找到解决方案。
我的主机文件:
192.168.10.10 homestead.app
192.168.10.10 nathan.app
192.168.10.10 ssiweb.app
192.168.10.10 test1.app
192.168.10.10 login.app
192.168.10.10 login2.app
192.168.10.10 photogallery.app
Homestead.yaml
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
folders:
- map: c:/users/nathan/desktop/www
to: /home/vagrant/Code
sites:
- map: homestead.app
to: /home/vagrant/Code/Project/public
- map: nathan.app
to: /home/vagrant/Code/Project1/public
- map: ssiweb.app
to: /home/vagrant/Code/Project2_ssiweb/public
- map: test1.app
to: /home/vagrant/Code/Project3_composer/public
- map: login.app
to: /home/vagrant/Code/Proj4_login/public
- map: login2.app
to: /home/vagrant/Code/Proj5_login_expanded/public
- map: photogallery.app
to: /home/vagrant/Code/Project6_photo_gallery/public
databases:
- homestead
- ssiweb
variables:
- key: APP_ENV
value: local
第一个问题是我无法 "Project6..." 进行配置。将其添加到主机文件后,homestead.yaml 我会转到浏览器,photogallery.app 会打开 homestead.app 的文件。我试过 vag运行t halt,vag运行t up --provision,重新启动软管计算机,等等。无法让它工作。现在我在做 vag运行t up 时遇到以下错误...
Job for nginx.service failed. See "systemctl status nginx.service" and "journalctl -xe" for details.
==> default: Job for php7.0-fpm.service failed. See "systemctl status php7.0-fpm.service" and "journalctl -xe" for details.
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.
然后我备份了数据库并销毁了盒子和 运行vag运行t,但问题仍然存在。接下来要解决什么问题?如何查看这些...
See "systemctl status php7.0-fpm.service" and "journalctl -xe" for details.
这是因为你已经升级了 laravel/homestead 盒子(vagrant box),但是没有升级来自存储库的 shell 脚本 laravel/homestead(https://github.com/laravel/homestead)。 新发布的 vagrant box 与旧脚本之间存在一些不一致。
只需再次克隆 repo,运行 vagrant provision
应该可以正常工作。
(不要忘记备份您的 Homestead.yaml 文件。否则,您将丢失您的站点条目。)