No input file specified. in Laravel 5 homestead installation - laravel-5

I'm learning Laravel and seem to be running into a problem with my paths in my homestead.yaml file but can't seem to figure it out. The error I'm receiving is 'No input file selected.'. I have my hosts file setup, and have tried halting and provisioning, yet I still keep getting this error. If anyone could point me in the right direction I would really appreciate it. Thanks!
yaml
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/Code
to: /home/vagrant/Code
type: "nsf"
sites:
- map: homestead.app
to: /home/vagrant/Code/homestead.app/public
databases:
- homestead
variables:
- key: APP_ENV
value: local
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
Hosts
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
192.168.10.10 homestead.app
~
~
~
~
~
~
~
~
~
~
~
~
"/etc/hosts" 11L, 269C
Ping output
ping -c 5 192.168.10.10
PING 192.168.10.10 (192.168.10.10): 56 data bytes
64 bytes from 192.168.10.10: icmp_seq=0 ttl=64 time=0.372 ms
64 bytes from 192.168.10.10: icmp_seq=1 ttl=64 time=0.252 ms
64 bytes from 192.168.10.10: icmp_seq=2 ttl=64 time=0.307 ms
64 bytes from 192.168.10.10: icmp_seq=3 ttl=64 time=0.337 ms
64 bytes from 192.168.10.10: icmp_seq=4 ttl=64 time=0.328 ms
--- 192.168.10.10 ping statistics ---
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 0.252/0.319/0.372/0.040 ms
.homestead :>

This error is almost always caused by either an incorrect web root,
check that /home/vagrant/Code/homestead.app/public is the correct path on the homestead box.
or permissions on the storage folder, laravel needs write permissions on several of the subfolders in storage.
Check that the webserver user has permission to write to that folder.

Related

Mapped sites returning This site can’t be reached

Have currently set up my Homestead.yaml file to map two different folders to two different sites. One is for my API and one is for phpmyadmin. Here are my homestead.yaml and the hosts file.
---
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: C:\Users\nikulas\Homestead\code
to: /vagrant/code
sites:
- map: dev.api.app
to: /vagrant/code/api/public
- map: dev.phpmyadmin.app
to: /vagrant/code/phpMyAdmin
databases:
- homestead
- subit
features:
- mysql: false
- mariadb: true
- postgresql: false
- ohmyzsh: false
- webdriver: false
#services:
# - enabled:
# - "postgresql#12-main"
# - disabled:
# - "postgresql#11-main"
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
hosts
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# 192.168.10.10 dev.api.app
# 192.168.10.10 dev.phpmyadmin.app
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
So for everything is mostly working. When running vagrant up and vagrant ssh I can navigate to the code directory on if I ls I have both the api and phpMyAdmin folder. I can make requests to my API in postman like this
192.168.10.10/v2/example-endpoint
The problem is if I try going to either dev.api.app or dev.phpmyadmin.app I get "This site can’t be reached" and I see no way of navigating to phpmyadmin in the browser.
In bash scripts and similar # is for comments, your hosts are basically out commented. For your host file to register your domains correctly, this should be removed.
# 192.168.10.10 dev.api.app
# 192.168.10.10 dev.phpmyadmin.app
Should be.
192.168.10.10 dev.api.app
192.168.10.10 dev.phpmyadmin.app

Laravel Homestead - I can ping homestead.app but I can't access in homestead.app in browser

Well:
I can access the files in the virtul server through vagrant SSH.
I can ping homestead.app through CMD.
I can ping the IP 192.160.10.10 through CMD.
But i can't access it through the browser.
if i enter 127.0.0.1:2222 in browser i get this:
SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.6
Protocol mismatch.
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: C:\projects\PHP
to: /home/vagrant/Code
sites:
- map: homestead.app
to: /home/vagrant/Code/smr/public
hhvm: true
databases:
- laraveldb
# blackfire:
# - id: foo
# token: bar
# client-id: foo
# client-token: bar
# ports:
# - send: 50000
# to: 5000
# - send: 7777
# to: 777
# protocol: udp
and this is the hosts file:
127.0.0.1 activate.adobe.com
192.168.10.10 homestead.app
I can see a Typo:
sites:
- map: homsetead.app
to: /home/vagrant/Code/smr/public
hhvm: true
Change the map to homestead.app and tell us

Why my homestead always redirect to xampp homepage

I have a some question I'm so confused about this.
I've install homestead for Laravel 5 but I've some problem when I try to access my domain laravel.dev this will redirect to xampp home page.
I was change homestead.yaml and hosts file but it doesn't work.
I was follow this instruction:
https://laravel.com/docs/5.2/homestead
http://ambercat.rahmanda.net/collections/2015/02/18/instalasi-homestead.html
But is not help.
this is my Homestead.yaml
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: C:/xampp/htdocs
to: /home/vagrant/Code
type: "nfs"
sites:
- map: laravel.dev
to: /home/vagrant/Code/laravel-crud/public
databases:
- homestead
And this is my Hosts
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
192.168.10.10 laravel.dev
Can anyone help me for this problem?
Please advise
Thankyou..

mongod Failed to obtain address information for hostname OS X

Having an issue starting mongo using mongod --dbpath. I get the following error:
NETWORK [HostnameCanonicalizationWorker] Failed to obtain address information for hostname ##########: nodename nor servname provided, or not known
Host name only has latin characters. I've tried multiple networks, deleted all DNS entries, confirmed my /etc/hosts looks fine and now I'm at a standstill.
Here is my /etc/hosts:
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
#::1 localhost
Try enabling the ipv6 and restart the mongod server
::1 localhost
I followed the answer in this JIRA ticket.
And here is my /etc/hosts file.
1 ##
2 # Host Database
3 #
4 # localhost is used to configure the loopback interface
5 # when the system is booting. Do not change this entry.
6 ##
7 # 127.0.0.1 localhost
8 127.0.0.1 localhost localhost.localdomain
9 255.255.255.255 broadcasthost
10 # ::1 localhost
change your HOSTNAME in /etc/sysconfig/network likes:
HOSTNAME=Steven
Then change your hostname in /etc/hosts:
127.0.0.1 localhost localhost.localdomain ...............
to
127.0.0.1 localhost Steven ...............

Setting up a second Homestead Laravel app

I've been trying to set up a second Laravel 5 app on my local Homestead space. I have been following the instructions from the official documentation and from this blog. (Although I have had to use the specific ID of the provision in order to get the vagrant provision command to work.)
My YAML file looks like this:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: C:\Users\Lisa\Documents\Homestead
to: /home/vagrant/Code
sites:
- map: homestead.app
to: /home/vagrant/Code/larapipeline/public
- map: tinkertower.app
to: /home/vagrant/code/tinkertower/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
My hosts file looks like this:
127.0.0.1 localhost
192.168.10.10 homestead.app
192.168.10.10 tinkertower.app
I THINK that having gone the provisioning and all that jazz, this should be setting up a starter Laravel app in the tinkertower folder, and that pointing to tinkertower.app should work. The tinkertower folder is empty, however, and trying to visit the site gives me a "server not found," as it's trying to find www.tinkertower.app. I can still get to the homestead.app site. I tried the "serve" command while sshed into homestead, but it didn't make any difference.
So, the questions:
1. Should these steps have added a clean version of Laravel into the tinkertower folder? If not, am I just supposed to grab a new version from Github?
Am I missing something that should get the tinkertower.app link working? I don't know enough to know if the fact that both sites have the same IP address is a problem nor how to fix it, nor if I'm missing something else. (After all, if I go to the IP address 192.168.10.10 directly, I get to the first app.)
Thanks in advance!
Edit 1
Updated YAML file:
---
ip: "192.168.10.10"
memory: 2048
cpus: 1
provider: virtualbox
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: C:\Users\Lisa\Documents\larapipeline
to: /home/vagrant/Code/larapipeline
- map: C:\Users\Lisa\Documents\tinkertower
to: /home/vagrant/Code/tinkertower
sites:
- map: homestead.app
to: /home/vagrant/Code/larapipeline/public
- map: tinkertower.app
to: /home/vagrant/code/tinkertower/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
Hosts file:
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
# 102.54.94.97 rhino.acme.com # source server
# 38.25.63.10 x.acme.com # x client host
# localhost name resolution is handled within DNS itself.
# 127.0.0.1 localhost
# ::1 localhost
127.0.0.1 localhost
192.168.10.10 tinkertower.app
192.168.10.10 homestead.app
The problem was in your homestead.yaml file.
folders:
- map: C:\Users\Lisa\Documents\Homestead\larapipeline
to: /home/vagrant/Code/larapipelin
- map: C:\Users\Lisa\Documents\Homestead\tinkertower
to: /home/vagrant/Code/tinkertower
sites:
- map: homestead.app
to: /home/vagrant/Code/larapipeline/public
- map: tinkertower.app
to: /home/vagrant/code/tinkertower/public
Don't forget to edit your hosts file. Now run vagrant up --provision, or vagrant reload --provision.
Edit:
Fixed case sensitivity issue on this line.
- map: tinkertower.app
to: /home/vagrant/Code/tinkertower/public
Edit 2:
Sorry another mistake :)
You should put your websites into the same directory your Homestead config directory is in.
+ Documents
|
| --- Homestead
|
| --- larapipeline
|
| --- tinkertower
So all three folders, larapipeline, tinkertower, and Homestead should be in Documents directory.
Anyways final code here (hopefully no more mistakes by me):
folders:
- map: C:\Users\Lisa\Documents\larapipeline
to: /home/vagrant/Code/larapipelin
- map: C:\Users\Lisa\Documents\tinkertower
to: /home/vagrant/Code/tinkertower
sites:
- map: homestead.app
to: /home/vagrant/Code/larapipeline/public
- map: tinkertower.app
to: /home/vagrant/Code/tinkertower/public
Your hosts file:
127.0.0.1 homestead.app
127.0.0.1 tinkertower.app
Edit 3:
You have a case sensitivity issue. I fixed it, just copy and paste these two lines in the correct place.
- map: tinkertower.app
to: /home/vagrant/Code/tinkertower/public
Change your hosts file, just do it and ask questions later.
# 127.0.0.1 localhost you don't need this line
127.0.0.1 tinkertower.app
127.0.0.1 homestead.app
Don't forget to move your actual folders to the correct place

Resources