Wandering Share with Laravel Manor

I am faced with the problem of getting a tramp to work with the slogan-caravan. My homestead.yaml file looks like this:

--- ip: "192.168.10.10" memory: 2048 cpus: 1 authorize: /Users/me/.ssh/id_rsa.pub keys: - /Users/me/.ssh/id_rsa folders: - map: /Users/me/Projects/laravel to: /home/vagrant/laravel sites: - map: laravel.app to: /home/vagrant/laravel/public variables: - key: APP_ENV value: local 

When I clicked http://laravel.app:8000 - everything works fine. When I run vagrant share , the generated URL returns a No input file specified. error No input file specified.

I'm at a dead end. A Google search for several hours did not lead to a solution. I am sure that this is just a basic configuration, and I do not connect the dots. Any pointers would be appreciated. Thanks!

+7
vagrant laravel
source share
3 answers

@Sanaco's answer skipped a few steps for me. This is a complete command to create a shared resource (after logging in)

 vagrant share --http 80 --name silly-sausage 

At the end of the command, a shared URL will be issued, which should look like this:

 http://silly-sausage.vagrantshare.com 

Once the share is installed, you need ssh in the stray box with

  vagrant ssh 

And run

 serve silly-sausage.vagrantshare.com ~/Code/project/path/public 

Without http flags, the firewall assigns 443 to http, which causes nginx to complain about using an HTTPS port for an HTTP connection.

When specifying a name, you only need to run the serve command for the first time.

+7
source share

The first step is to create a Vagrant Cloud account if you have not already done so.

Once you have done this, in your terminal ( not registered on the Homestead machine) run vagrant login and log in with your data.

Then run vagrant global-status to find the id of the vagrant machine that Homestead is running on.

Launch vagrant share 123a4 (where 123a4 is the machine ID) and your computer will be shared!

Please note that you may need to configure Nginx to listen for the URL that was generated for you, so it points to the correct site on the computer.

+3
source share

There is a solution that does not require doing anything on your home virtual machine.

You can install the ngrok program, which does a similar thing for vagrant share , but works better with several sites that Homestead uses. You will need to register for an account, but the main use is free.

Launch: ngrok http -host-header=rewrite your-local-site.app:80

(where your-local-site.app is what is used for the map directive in your Homestead.yaml file)

Your site will then be accessible worldwide at the URL that ngrok gives you.

+3
source share

All Articles