Genymotion 上的 403 禁止错误
403 Forbidden error on Genymotion
我在我的 PC 上安装了 genymotion 模拟器,我想访问我的 WAMP 本地服务器,我在我的 cmd
上 运行 ipconfig
所以我得到了这个 IP_address 192.168.56.1
但问题是我总是得到这个错误
403 Forbidden
You don't have permission to access / on this server
我尝试了此 question 中给出的所有答案,但 none 解决了我的问题。
我是运行
Mysql 5.5.8,
PHP 5.3.5 和
阿帕奇 2.2.17
请问有人知道我该如何解决这个错误吗?
@KANYOAUSTINKANE。这是我的代码或子域
<Virtualhost *:80>
DocumentRoot "C:/wamp/www/mobile"
ServerName localhost
ServerAlias m.local host
</Virtualhost>
请帮帮我,我一直很不安
好的,这是一个解决方案。
第一步
更改虚拟主机的位置并在末尾添加一个 /
像这样
DocumentRoot "C:/wamp/www/mobile/"
第二步
转到位于 C:/camp/bin/apache/Apache2.2.17/conf/httpd.conf
的 httpd.conf
文件,转到具有 Listen 80
的行并将其更改为 Listen *:80
这将使它可以收听任何IP 地址
终于
您转到 httpd.conf
文件的末尾并添加此
# Tells Apache to identify which site by name
NameVirtualHost *:80
# Tells Apache to serve the default WAMP Server page to "localhost"
<VirtualHost 127.0.0.1>
ServerName localhost
DocumentRoot "C:/wamp/www"
</VirtualHost>
# Tells Apache to serve your mobile pages to "m.localhost"
<VirtualHost 127.0.0.1>
# The name to respond to ServerName m.localhost
# Folder where the file is located which in your case is
DocumentRoot "C:/wamp/www/mobile/"
<Directory "C:/wamp/www/mobile/">
Allow from all
Order Allow,Deny
AllowOverride All
</Directory>
# Apache will look for these files, in this order, if no file is specified in the URL, but you can add more files apart from the two I listed depending on what you are having
DirectoryIndex index.html index.php
</VirtualHost>
#Here you duplicate the code for your mobile site to also accept your IP address which is 192.168.56.1
<VirtualHost 192.168.56.1>
# The name to respond to ServerName m.localhost
# Folder where the file is located which in your case is
DocumentRoot "C:/wamp/www/mobile/"
<Directory "C:/wamp/www/mobile/">
Allow from all
Order Allow,Deny
AllowOverride All
</Directory>
# Apache will look for these files, in this order, if no file is specified in the URL, but you can add more files apart from the two I listed depending on what you are having
DirectoryIndex index.html index.php
</VirtualHost>
已测试并正常工作。请不要忘记标记答案
我在我的 PC 上安装了 genymotion 模拟器,我想访问我的 WAMP 本地服务器,我在我的 cmd
上 运行 ipconfig
所以我得到了这个 IP_address 192.168.56.1
但问题是我总是得到这个错误
403 Forbidden You don't have permission to access / on this server
我尝试了此 question 中给出的所有答案,但 none 解决了我的问题。
我是运行 Mysql 5.5.8, PHP 5.3.5 和 阿帕奇 2.2.17
请问有人知道我该如何解决这个错误吗?
@KANYOAUSTINKANE。这是我的代码或子域
<Virtualhost *:80>
DocumentRoot "C:/wamp/www/mobile"
ServerName localhost
ServerAlias m.local host
</Virtualhost>
请帮帮我,我一直很不安
好的,这是一个解决方案。
第一步
更改虚拟主机的位置并在末尾添加一个 /
像这样
DocumentRoot "C:/wamp/www/mobile/"
第二步
转到位于 C:/camp/bin/apache/Apache2.2.17/conf/httpd.conf
的 httpd.conf
文件,转到具有 Listen 80
的行并将其更改为 Listen *:80
这将使它可以收听任何IP 地址
终于
您转到 httpd.conf
文件的末尾并添加此
# Tells Apache to identify which site by name
NameVirtualHost *:80
# Tells Apache to serve the default WAMP Server page to "localhost"
<VirtualHost 127.0.0.1>
ServerName localhost
DocumentRoot "C:/wamp/www"
</VirtualHost>
# Tells Apache to serve your mobile pages to "m.localhost"
<VirtualHost 127.0.0.1>
# The name to respond to ServerName m.localhost
# Folder where the file is located which in your case is
DocumentRoot "C:/wamp/www/mobile/"
<Directory "C:/wamp/www/mobile/">
Allow from all
Order Allow,Deny
AllowOverride All
</Directory>
# Apache will look for these files, in this order, if no file is specified in the URL, but you can add more files apart from the two I listed depending on what you are having
DirectoryIndex index.html index.php
</VirtualHost>
#Here you duplicate the code for your mobile site to also accept your IP address which is 192.168.56.1
<VirtualHost 192.168.56.1>
# The name to respond to ServerName m.localhost
# Folder where the file is located which in your case is
DocumentRoot "C:/wamp/www/mobile/"
<Directory "C:/wamp/www/mobile/">
Allow from all
Order Allow,Deny
AllowOverride All
</Directory>
# Apache will look for these files, in this order, if no file is specified in the URL, but you can add more files apart from the two I listed depending on what you are having
DirectoryIndex index.html index.php
</VirtualHost>
已测试并正常工作。请不要忘记标记答案