Last active
April 2, 2016 20:46
-
-
Save jackvial/95b02309ddfbf19bc62d to your computer and use it in GitHub Desktop.
Laravel Homestead 502 badgate fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wrote this up here a bit ago. See step 13. The rest of it may be useful to others as well: | |
https://laracasts.com/discuss/channels/general-discussion/homestead-with-php7 | |
The tl;dr is that you need to edit your nginx config. | |
sudo nano /etc/ngingx/sites-enabled/whatever-you-call-your-app.com and change: | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
To | |
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; | |
Then restart nginx: | |
sudo service nginx restart | |
Multiple site setip | |
I'm not sure which version om Homestead I'm running, but I can run as much sites I want, without changing anything to the Homestead.yaml file. I don't change any configuration file and don't need to reboot / provision homestead vagrant. | |
In the Homestead.yaml file, I added this mapping: | |
folders: | |
- map: ~/Code | |
to: /home/vagrant/Code | |
So every folder in my local Code directory is mapped to homestead. If I want to add a site I do: Add a new Laravel project to my Code directory, for example: ~/Code/newsite I start up homestead, ssh into it and run this command. | |
serve www.newsite.dev /home/vagrant/Code/newsite/public | |
Now add this domain to your host file, on OS X, use this command: | |
sudo nano /private/etc/hosts | |
Add the new domain: | |
192.168.10.10 www.newsite.dev | |
Enter www.newsite.dev in you browser, you should now get your newly installed website. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Instead of running Homestead provision etc goto Homestead/ and run vagrant destroy and vagrant up