流浪汉不使用ngrok,也没有流浪汉共享

时间:2020-11-06 19:58:03

标签: vagrant ngrok vagrant-share

我想从无所事事的环境中公开Webhook网址,但是我尝试过的所有选项都失败了。我的网站可通过localwebsite.dev访问,这是我的配置:

/ etc / hosts

11.11.11.1 localwebsite.dev localwebsite

流浪文件

Vagrant.configure("2") do |config|
    config.vm.box = "ubuntu/xenial64"
    config.vm.hostname = "vagrant.us.local"
    config.vm.network "private_network", ip: "11.11.11.1"
    config.vm.network "forwarded_port", guest: 80, host:8080
config.vm.provider :virtualbox do |vb|
   vb.gui=false
   vb.name="myvb"
   vb.memory=4090
   vb.cpus=2
end

config.vm.synced_folder "/User/golo/proj/goo", "/var/www/goo"

end

Apache虚拟主机配置

DocumentRoot / var / www / goo ServerName localwebsite.dev

<Directory /var/www/goo>
    AllowOverride All
    Require all granted
</Directory>

我尝试的第一个选项是 Vagrant Share (无用份额--http 80):这仅给出以下输出:

default: Local Machine address:127.0.0.1 default:Note: With the
local address (127.0.0.1), Vagrant Share can only share any ports
you have forwarded. Assign an IP or address to your machine to
expose all TCP ports. Consult the documentation for your
provider('virtualbox') for more information. 
default: Local HTTP
port: 80 
default: Local HTTPS port: disabled default: Port: 2222
default: Port: 8080 default: Creating Vagrant Share session...
default: HTTP URL: http://857oshd5y8759c0.ngrok.io

在访问ngrok页面时,它显示:

无法完成隧道连接 http://857oshd5y8759c0.ngrok.io已成功传送到您的 ngrok客户端,但是客户端无法建立与该客户端的连接 本地地址 localhost:80 导致的错误是:拨号tcp 127.0.0.1:80 connect:连接被拒绝

我尝试的第二个选项是使用直接安装在主机上的 Ngrok (ngrok htttp -host-header = rewrite localwebsite.dev),但是在访问链接时收到错误消息:

无法完成隧道连接 http://857oshd5y8759c0.ngrok.io已成功传送到您的 ngrok客户端,但是客户端无法建立与该客户端的连接 本地地址 localwebsite.dev:80 造成的错误是:拨号TCP 11.11.11.1:80 connect:操作超时

我的网站可以通过http:\ localwebsite.dev访问并且运行良好,但是如果我尝试使用localwebsite.dev:80,则无法访问

我所缺少的是阻止通过ngrok链接访问该网站的东西?

0 个答案:

没有答案