2016-09-05 66 views
1

即时尝试打开我的wamp服务器与我的android设备,但我得到“android你没有权限访问/在此服务器上”apache版本是2.4 .18.i tryed修改httpd.conf文件,但它不work.Now它是这样的:android你没有权限访问/在此服务器WAMP

DocumentRoot "c:/wamp64/www" 

<Directory "c:/wamp64/www/"> 
    # 
    # Possible values for the Options directive are "None", "All", 
    # or any combination of: 
    # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews 
    # 
    # Note that "MultiViews" must be named *explicitly* --- "Options All" 
    # doesn't give it to you. 
    # 
    # The Options directive is both complicated and important. Please see 
    # http://httpd.apache.org/docs/2.4/mod/core.html#options 
    # for more information. 
    # 
    Options Indexes FollowSymLinks 

    # 
    # AllowOverride controls what directives may be placed in .htaccess files. 
    # It can be "All", "None", or any combination of the keywords: 
    # AllowOverride FileInfo AuthConfig Limit 
    # 
    AllowOverride all 

    # 
    # Controls who can get stuff from this server. 
    # 

    # onlineoffline tag - don't remove 
    Order Deny,Allow 
    Allow from all 

</Directory> 

我希望你能帮助我

回答

7

对于WampServer的新版本(3.0+)你不需要到两件事:

1)修改文件httpd.conf 转t其中WAMP安装如

C:\wamp64\bin\apache\apache2.4.23\conf和编辑o目录如下:

DocumentRoot "${INSTALL_DIR}/www" 
<Directory "${INSTALL_DIR}/www/"> 
# 
# Possible values for the Options directive are "None", "All", 
# or any combination of: 
# Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews 
# 
# Note that "MultiViews" must be named *explicitly* --- "Options All" 
# doesn't give it to you. 
# 
# The Options directive is both complicated and important. Please see 
# http://httpd.apache.org/docs/2.4/mod/core.html#options 
# for more information. 
# 
Options +Indexes +FollowSymLinks +Multiviews 

# 
# AllowOverride controls what directives may be placed in .htaccess files. 
# It can be "All", "None", or any combination of the keywords: 
# AllowOverride FileInfo AuthConfig Limit 
# 
AllowOverride all 

# 
# Controls who can get stuff from this server. 
# 

#onlineoffline tag - don't remove 
Require all granted 

编辑要求无要求所有授予

2)现在去C:\wamp64\bin\apache\apache2.4.23\conf\extra\httpd-vhost.conf和对本地主机定义的虚拟主机做相同的更改

AllowOverride All 
Require all granted 

重新启动它应该工作的服务器

+0

谢谢!它效果很好。 – JCarlos

+0

这就是答案......谢谢。 – aidonsnous

相关问题