【问题标题】:Access Forbidden when using xampp with ngrok for accessing a local vhost使用 xampp 和 ngrok 访问本地虚拟主机时禁止访问
【发布时间】:2021-04-05 09:55:29
【问题描述】:

我已经设置了一个在本地工作的虚拟主机,我想使用 ngork 从其他设备访问它。但我总是收到这样的信息:“禁止访问! 您无权访问请求的目录。没有索引文档或目录被读保护。”尝试访问 ngrok 提供的链接时(虽然在本地它工作正常,我什至尝试完全禁用我的防火墙但问题仍然存在)

我的虚拟主机:

NameVirtualHost *:80

<VirtualHost security.local:80>
  ServerName security.local
  ServerAlias security.local
  DocumentRoot "E:\Websites\security\public"
  <Directory "E:\Websites\security\public">
       Order Allow,Deny
       Options All
       AllowOverride All
       Allow from all
       Require all granted
  </Directory>
</VirtualHost>

我使用的 ngrok 命令:

ngrok.exe http security.local

我的主机文件:

127.0.0.1   security.local

【问题讨论】:

    标签: apache xampp vhosts ngrok


    【解决方案1】:

    我找到了解决方案。正确的 ngrok 命令必须是:

    ngrok http -host-header=rewrite security.local
    

    【讨论】:

      猜你喜欢
      • 2017-11-26
      • 2016-08-05
      • 2017-12-20
      • 2012-02-11
      • 2012-12-28
      • 2011-09-13
      • 2016-11-06
      相关资源
      最近更新 更多