首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >流浪分享- Laravel Homestead,Ubuntu

流浪分享- Laravel Homestead,Ubuntu
EN

Stack Overflow用户
提问于 2019-03-12 02:38:03
回答 1查看 516关注 0票数 0

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

代码语言:javascript
复制
==> 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...

但当我访问https://dashboard.ngrok.com/status时,系统已经为我创建了一个网址。例如,http://eaeefc3d.ngrok.io

然而,当我转到这个URL时,我得到了默认的Apache欢迎页面。

我还尝试通过ssh进入homestead并运行命令:serve eaeefc3d.ngrok.io ~/Code/myapp/public/ (正如我在Mike Miller的回答中看到的那样:vagrant share with laravel homestead),它给出了我的输出:

dos2unix: converting file /vagrant/scripts/serve-laravel.sh to Unix format...,但我仍然可以看到Apache欢迎页面。

有什么想法吗?

EN

回答 1

Stack Overflow用户

发布于 2019-03-17 18:46:22

感谢@MikeMiller在this thread中的评论为我指明了正确的方向

下面是我是如何让ngrok工作的:

  1. ssh到宅基地,即。homestead uphomestead ssh
  2. cd添加到项目目录,即.将标题设置为项目名称的cd Code/foodonsale/
  3. Run ngrok : ngrok http -host- -host-header =rewrite myproject.test:80
  4. You将得到类似以下内容的输出: ngrok by @inconshreveable

会话状态在线会话过期7小时59分钟更新更新可用(版本2.3.18,要更新的Ctrl-U )版本2.2.8区域美国(美国)网络界面http://192.168.10.10:4040Forwarding http://0b7f6aa0.ngrok.io -> myproject.test:80 Forwarding https://0b7f6aa0.ngrok.io -> myproject.test:80

  • 转到Web Interface指定的URL.在这里,您可以在重定向到yout application.

的实时公共版本的httphttps选项上监视您的https的请求

有用的链接:- ngrok DOC

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/55108320

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档