I am having trouble accessing a site hosted on a laravel homestead virtual machine, using the hostname homestead.app:8000.
http://homestead.app:8000 returns a "This webpage is not available" message in chrome.
127.0.0.1:8000 returns the 'Laravel 5' landing page, which I was expecting from the above.
I have added the following to the /etc/hosts file on my local machine (and tried a few variations of this).
127.0.0.1 homestead.app:8000
Any obvious reasons why this wouldn't work? Steps that may have been missed?
This is the content of the Homestead.yaml file
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/homestead.pub
keys:
- ~/.ssh/homestead
folders:
- map: ~/Apps/test
to: /home/vagrant/Code
sites:
- map: homestead.app
to: /home/vagrant/Code/Laravel/public
databases:
- test
variables:
- key: APP_ENV
value: locals
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 93000
# to: 9300
# - send: 7777
# to: 777
# protocol: udp
Change /etc/hosts on your local machine to this
192.168.10.10 homestead.app
Save and in the browser of your choice on your local machine navigate to
http://homestead.app
Related
Trying to setup Homestead for laravel development. Did every step in laravel docs about homestead, but i cant get my project link running.
I added this line to hosts file
192.168.10.10 shop.dev
this is how my Homestead.yml file looks like:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: c:/users/lukas/.ssh/id_rsa.pub
keys:
- c:/users/lukas/.ssh/id_rsa
folders:
- map: e:/Projektai/Homestead
to: /home/vagrant/Code
sites:
- map: shop.dev
to: /home/vagrant/Code/Parduotuve/public
databases:
- homestead
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
At first i had some problems running VM but I managed to get it working. However now this is not working at all.
I have slowly been working on getting Laravel/Homestead up on ubuntu 15.1 and am struggling to get my folders and sites mapped in my Homestead.yaml file. The virtual machine is up and running, when I go to Homestead.app in the browser it tells me that no input file specified. I know that I don't have it mapped correctly.
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Homestead/Projects/Laravel
to: /home/vagrant/Projects
sites:
- map: homestead.app
to: /home/goldenos/Homestead/Projects/public
databases:
- homestead
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
I have my index.php file in ~/Homestead/Projects in a folder named Laravel if I need to provide any additional information please let me know and I will provide it asap. Thanks in advance for any information!
-Luke
Try THIS instead:
folders:
- map: ~/Homestead/Projects // your local whole projects folder on the host machine (so you can setup multiple websites on the same virtual box)
to: /home/vagrant/Projects // synced folder in virtual box
sites:
- map: homestead.app
to: /home/vagrant/Projects/Laravel/public // path of project in the virtual box
- map: site2.app
to: /home/vagrant/Projects/Site2/public
Don't forget to run vagrant up/reload flagging --provision after you edited your .yaml file like:
vagrant up --provision
OR
vagrant reload --provision
I am getting an error on Laravel Homstead which stated the 403 forbidden error, I cannot seem to see what is wrong in the .yaml file. I am using OSX if that helps. Below is my .yaml file for assistance.
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: /Users/jordanbarber/vagrant/laravel/projects/mysite/html/vAMSYS
to: /home/vagrant/Code
sites:
- map: homestead.app
to: /home/vagrant/base/public
databases:
- homestead
variables:
- key: APP_ENV
value: local
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 93000
# to: 9300
# - send: 7777
# to: 777
# protocol: udp
Continue from " so, what would that directory be? " If you're using windows, go to you root folder and type "cmd" in the path at the top, after that run
vagrant reload
Your folder might be wrong.
Open a terminal window in your project directory and enter
pwd
This prints the working directory, change the working directory in your yaml file.
Hope it helps.
You need to also edit your /etc/hosts file to include:
192.168.10.10 homestead.app
Then run
vagrant reload --provision
I'm setting up homestead. But when I want to add another website to homestead it points to the same directory?
This is my Homestead.yaml file:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/documents/vagrant/sites
to: /home/vagrant/Code
sites:
- map: test.app
to: /home/vagrant/Code/test
- map: testt.app
to: /home/vagrant/Code/secondtest
databases:
- homestead
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
When I go to testt.app it points to the same directory as test.app. This is how my etc/hosts file looks like:
My homestead directory:
Every time I make changes in my homestead.yaml file I do: "vagrant provision". When I ssh into my homestead server I can go to the directory secondtest so it exists.
In your etc/hosts you should point both domains to 192.168.10.10 IP and not 127.0.0.1
Have you actually run the provision command?
homestead provision
system:windows10 10240
vagrant:1.7.4
virtualbox:5.0.2
and I have tried virtualbox4.3.30,4.3.28,...4.3.12, When I run homestead up , it fails with the same error message:
C:\Windows\system32>homestead up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Clearing any previously set network interfaces...
The specified host network collides with a non-hostonly network!
This will cause your specified IP to be inaccessible. Please change
the IP or name of your host only network so that it no longer matches that of
a bridged or non-hostonly network.
This is my Homestead.yaml file
---
ip: "192.168.0.15"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: D:/wnmp/www
to: /home/vagrant/Code
sites:
- map: homestead.com
to: /home/vagrant/Code/Laravel/public
databases:
- homestead
variables:
- key: APP_ENV
value: local
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 93000
# to: 9300
# - send: 7777
# to: 777
# protocol: udp
Try different IP like 10.0.0.X