Homestead多个站点和nginx无法正常工作

时间:2016-08-24 17:32:18

标签: nginx vagrant virtualbox homestead php-7

我一直在单个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 ......"提供。将它添加到hosts文件和homestead.yaml后,我会去浏览器,photogallery.app会打开homestead.app的文件。我尝试了流浪汉停止,流浪汉 - 提供,重新启动软管计算机等等。无法使其正常工作。现在我在做流浪汉时遇到以下错误......

 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.

然后我备份了数据库并销毁了盒子然后向上运行了流浪汉,但问题仍然存在。接下来要解决什么问题?我怎样才能看到这些......

See "systemctl status     php7.0-fpm.service" and "journalctl -xe" for details.

1 个答案:

答案 0 :(得分:1)

这是因为您升级了 laravel / homestead 框(流浪盒),但没有升级来自存储库laravel / homestead(https://github.com/laravel/homestead)的shell脚本。 新发布的流浪盒和旧脚本之间存在一些不一致。

再次克隆repo并运行vagrant provision应该可以正常工作。 (不要忘记备份您的 Homestead.yaml 文件。如果没有,您将丢失您的网站条目。)