流浪者共享

编程入门 行业动态 更新时间:2024-10-24 01:54:28
本文介绍了流浪者共享-Laravel Homestead,Ubuntu的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

当我运行vagrant share id-goes-here --http 80时,终端卡住了,并且没有显示URL:

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...

但是当我访问 dashboard.ngrok/status 时,URL为我创建了.例如, eaeefc3d.ngrok.io

but when I go to dashboard.ngrok/status, a URL has been created for me. For example, eaeefc3d.ngrok.io

但是,当我转到该URL时,会得到默认的Apache欢迎页面.

However, when I go to this URL, I get the default Apache welcome page.

我还尝试过将ssh放进宅基并运行命令: serve eaeefc3d.ngrok.io ~/Code/myapp/public/(正如我在此主题中的Mike Miller的答案中所读到的:与laravel homestead的无用份额

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...,但是我仍然获得Apache欢迎页面.

dos2unix: converting file /vagrant/scripts/serve-laravel.sh to Unix format... but I still get the Apache welcome page.

有什么想法吗?

推荐答案

感谢@MikeMiller在此线程

Thanks to @MikeMiller for pointing me in the right direction with his comment in this thread

  • ssh进入宅基地,即homestead up和homestead ssh
  • cd到项目目录,即. cd Code/foodonsale/
  • 在-host-header设置为项目名称的情况下运行ngrok: ngrok http -host-header = rewrite myproject.test:80
  • 您将获得类似以下的输出: ngrok by @inconshreveable

  • ssh into homestead, ie. homestead up and homestead ssh
  • cd to the project directory, ie. cd Code/foodonsale/
  • Run ngrok with the -host-header set to the project name: ngrok http -host-header=rewrite myproject.test:80
  • You will get an output like the following: ngrok by @inconshreveable Session Status online Session Expires 7 hours, 59 minutes Update update available (version 2.3.18, Ctrl-U to update) Version 2.2.8 Region United States (us) Web Interface 192.168.10.10:4040 Forwarding 0b7f6aa0.ngrok.io -> myproject.test:80 Forwarding 0b7f6aa0.ngrok.io -> myproject.test:80

  • 转到Web Interface指定的URL.在这里,您可以监视您的应用程序的请求.
  • 单击http或https选项,将其重定向到您的应用程序的实时公共版本.
  • Go to the URL designated by Web Interface. Here you can monitor the requests of your application.
  • Click on either the http or the https options to be redirected to the live public version of yout application.
  • 有用的链接: - ngrok DOC

    Useful links: - ngrok DOC

    更多推荐

    流浪者共享

    本文发布于:2023-10-07 12:53:54,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1469441.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:流浪者

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!