Nathan Scherneck
Nathan Scherneck

Reputation: 396

Homestead multiple sites and nginx not working

I've been working with multiple sites on a single Homestead vm and just started having problems. Worked fine until I tried to work without an internet connection. Now I'm having these problems with or without the internet connection.

I've read quite a few threads relating to these issues but haven't found a soluton.

My hosts file:

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

First problem is that I couldn't get "Project6..." to provision. After adding it to the hosts file and homestead.yaml I would go to the browser and photogallery.app would open the files for homestead.app. I tried vagrant halt, vagrant up --provision, rebooted the hose computer, etc, etc. Couldn't get it working. Now I'm getting the following error when doing vagrant 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.

I then backed up the databases and destroyed the box and ran vagrant up, but the problem persists. What to troubleshoot next? How can I view these...

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

Upvotes: 0

Views: 1583

Answers (1)

Indra
Indra

Reputation: 36

This is because of you have upgraded the laravel/homestead box (vagrant box) but did not upgrade the shell scripts that come from repository laravel/homestead (https://github.com/laravel/homestead). There are some inconsistencies between newly released vagrant box and old scripts.

Just clone repo again and run vagrant provision should work fine. (Do not forget to backup your Homestead.yaml file. If not, you'll loose your site entries.)

Upvotes: 1

Related Questions