When I run vagrant share id-goes-here --http 80
, the terminal gets stuck and it does not show me a URL:
==> homestead-7: Detecting network information for machine...
homestead-7: Local machine address: 127.0.0.1
homestead-7:
homestead-7: Note: With the local address (127.0.0.1), Vagrant Share can only
homestead-7: share any ports you have forwarded. Assign an IP or address to your
homestead-7: machine to expose all TCP ports. Consult the documentation
homestead-7: for your provider ('virtualbox') for more information.
homestead-7:
homestead-7: Local HTTP port: 80
homestead-7: Local HTTPS port: disabled
homestead-7: Port: 2222
homestead-7: Port: 27017
homestead-7: Port: 33060
homestead-7: Port: 4040
homestead-7: Port: 44300
homestead-7: Port: 54320
homestead-7: Port: 8000
homestead-7: Port: 8025
==> homestead-7: Creating Vagrant Share session...
but when I go to https://dashboard.ngrok.com/status, a URL has been created for me. For example, http://eaeefc3d.ngrok.io
However, when I go to this URL, I get the default Apache welcome page.
I have also tried to ssh into homestead and run the command:
serve eaeefc3d.ngrok.io ~/Code/myapp/public/
(as I read in Mike Miller's answer in this thread: vagrant share with laravel homestead) which gives me the output:
dos2unix: converting file /vagrant/scripts/serve-laravel.sh to Unix format...
but I still get the Apache welcome page.
Any ideas?
Thanks to @MikeMiller for pointing me in the right direction with his comment in this thread
Here is how I got ngrok to work:
homestead up
andhomestead ssh
cd Code/foodonsale/
-host-header
set to the project name: ngrok http -host-header=rewrite myproject.test:80You will get an output like the following: ngrok by @inconshreveable
Web Interface
. Here you can monitor the requests of your application.http
or thehttps
options to be redirected to the live public version of yout application.Useful links: - ngrok DOC