【问题标题】:connect to local machine from iphone从 iphone 连接到本地机器
【发布时间】:2016-02-15 23:18:49
【问题描述】:

我正在尝试将我的 iPhone 连接到我的 Mac 本地计算机上的网络服务。

在 Mac 上,我可以转到 localhost/~username 并获得“我的网站工作”

在 iPhone 上,我转到 xxx.xxx.xxx.xxx(Mac 的 IP 地址)并得到“它可以工作!”但是当我转到 xxx.xxx.xxx.xxx/~username 时,我被禁止 - 您无权访问服务器上的 /~username

两台设备在同一个Wi-Fi网络

这是 Mac OS X,请不要链接到适用于 Windows 的解决方案。我是个菜鸟

【问题讨论】:

  • 该解决方案适用于 Windows。我在 OS X 上
  • 你必须改变httpd.conffile...它与操作系统无关..它是apache中的一个文件。
  • 我已经浏览了教程,但我没有# onlineoffline tag,下面是一样的吗? # Deny access to the entirety of your server's filesystem. You must # explicitly permit access to web content directories in other # <Directory> blocks below. # <Directory /> AllowOverride none Require all denied </Directory>
  • 是的,这就是问题所在。使它:AllowOverride all Require all inside the Directory 标签。

标签: php ios permissions localhost


【解决方案1】:

在您的 Mac 上打开“设置”,转到“共享”,启用文件共享,将您的用户文件夹添加到共享文件夹并允许所有人访问该资源。

【讨论】:

    猜你喜欢
    • 2014-02-24
    • 2019-12-12
    • 2015-11-28
    • 2012-01-10
    • 2022-01-13
    • 1970-01-01
    • 2022-01-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多