简体   繁体   English

我无法在Android中访问localhost

[英]I can't access localhost in Android

I setup a localhost and it works fine on macos sierra. 我设置了一个本地主机,它在macOS Sierra上运行良好。

localhost/~username

But now I'm trying to acces from Chrome Browser on my Android 但是现在我正在尝试从Android上的Chrome浏览器访问

192.168.x.x/~username

and got this message. 并收到此消息。

Forbidden. You don't have permission to access /~username from this server

My phone and mac are connected to the same wifi. 我的手机和Mac连接到同一wifi。

And also edit the httpd.conf 并编辑httpd.conf

<Directory />
   AllowOverride All
   Require all granted
</Directory>

And it´s not working. 而且它不起作用。

打开终端并输入以下命令:

chmod 777 parent_directory/localhost

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM