Apache提示You don't have permission to access / on this server问题解决
测试时遇到将一本地目录设置为一apache的虚拟主机,在httpd-vhosts.conf文件中进行简单设置,然后在hosts文件中将访问地址指向本地,启动apache,进行访问,却出现了You don't have permission to access / on this server的提示,baidu了一下,原来是因为我的虚拟主机目录为非apache安装目录下的htdocs,所以违反了apache对默认对网站根访问权限。
apache的默认虚拟主机根目录地址为../Apache Software Foundation/Apache2.2/htdocs 目录下,需要对httpd.conf文件进行修改才能指向其他目录。
在httpd.conf文件下找到这段:
- <span style="font-size: x-small;">#
- # Each directory to which Apache has access can be configured with respect
- # to which services and features are allowed and/or disabled in that
- # directory (and its subdirectories).
- #
- # First, we configure the "default" to be a very restrictive set of
- # features.
- #
- <Directory />
- Options FollowSymLinks
- AllowOverride None
- Order deny,allow
- Deny from all
- </Directory></span>
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
将之修改为
- <span style="font-size: x-small;"># 允许指向外部的目录进行访问
- <Directory />
- Options Indexes FollowSymLinks
- AllowOverride None
- </Directory></span>
# 允许指向外部的目录进行访问
<Directory />
Options Indexes FollowSymLinks
AllowOverride None
</Directory> <Directory />
Options Indexes FollowSymLinks ExecCGI
AllowOverride None
</Directory>
然后重启apache,就ok了。
Apache提示You don't have permission to access / on this server问题解决的更多相关文章
- Apache提示You don't have permission to access / on this server 解决
本文链接:https://blog.csdn.net/Niu_Eva/article/details/90741894 Apache提示You don’t have permission to acc ...
- apache 提示You don't have permission to access /test.php on this server.怎样解决
原文:apache 提示You don't have permission to access /test.php on this server.怎样解决 关键字: Apache 403 For ...
- Mac OS X中配置Apache后提示You don't have permission to access / on this server
根据这篇博客http://www.cnblogs.com/snandy/archive/2012/11/13/2765381.html,在mac系统中,配置的apache,配置完成后,提示 You d ...
- 输入http://localhost/,apache出现You don't have permission to access/on this server.的提示,如何解决?
本地搭建wamp,输入http://127.0.0.1访问正常,当输入http://localhost/,apache出现You don't have permission to access/on ...
- Apache 2.4.27 局域网访问提示 You don't have permission to access / on this server
问题: 本机用localhost和ip都可以访问,局域网不可以访问,并且出现提示 You don't have permission to access / on this server. 解决: 如 ...
- apache出现You don’t have permission to access / on this server问题的解决
今天在部署一个系统时,在apache中新开了一个VirtualHost,然后设置了DocumentRoot,等访问时却提示“You don’t have permission to access / ...
- phpstudy无法访问主页,提示You don't have permission to access / on this server解决办法
1.输入localhost提示:You don't have permission to access / on this server. 新版phpStudy为了安全,取消Apache和nginx列 ...
- php多站点配置以及Forbidden You don't have permission to access / on this server问题解决
php多站点配置以及Forbidden You don't have permission to access / on this server问题解决 一.总结 一句话总结:我的问题是php的版本问 ...
- apache出现You don't have permission to access / on this server. 提示
今天在新的linux上跑原来的代码,使用的虚拟主机的模式进行操作.几个相关的网站放在一个文件里,想法是通过网站列出的目录进行相应的网站进行操作.一切设置完成后,在浏览器中运行出现在You don't ...
随机推荐
- JavaScript高级程序设计54.pdf
过滤输入 对于一些浏览器,可以使用正则表达式里的text()测试用户按下的按键,Firefox和safari(3.1版本之前)会对向上向下.退格键和删除键触发keypress事件,在Firefox中, ...
- 容联云通讯_提供网络通话、视频通话、视频会议、云呼叫中心、IM等融合通讯能力开放平台。
容联云通讯_提供网络通话.视频通话.视频会议.云呼叫中心.IM等融合通讯能力开放平台. undefined
- HTML5和CSS3不仅仅是两项新的Web技术标准
HTML5和CSS3不仅仅是两项新的Web技术标准 HTML5和CSS3不仅仅是两项新的Web技术标准,更代表了下一代HTML和CSS技术.虽然HTML5的标准规范还没有正式发布,但是未来的发展前景已 ...
- 如何引入一个Schema 文件
Schema(掌握如何引入一个schema文件) * 名称空间 : 指的是一个环境,所用的标签来自于哪个环境定义的. * 掌握引用schema文件: xml中引入s ...
- Linux 上的游戏 Supertuxkart
Linux 上玩游戏 Supertuxkart 中午休息的时候,打开Supertuxkart游戏,这个是GNU下的一款3D赛车游戏,制作精美,玩法简单.最有趣的是,我连接笔记本的外接键盘被侦测出来是M ...
- 非常棒的jqChart图表插件
由于项目需要,做一些类似于OA系统的应用时,表格用到的是最多的,那么图表展示就先显得尤为的重要,其中柱柱状图.折线图.饼状图又居多. 之前一直使用的是Chrome下的googleAPI中提供的char ...
- BA的广度和深度
http://insights.thoughtworkers.org/ba-capability-and-development-path-in-thoughtworks/ 作者:ThoughtWor ...
- nginx lua 开发笔记
获取 在lua代码中获取 location 正则的参数对应的变量 // location location ~/lua_http_2/(\w*.+) { } // lua local vars=ngx ...
- android 66 sharedperference的使用
package com.itheima.qqlogin; import java.io.BufferedReader; import java.io.File; import java.io.File ...
- oracle8
数据库管理 -- 管理表空间和数据文件 表空间是数据库的逻辑组成部分.从物理上讲,数据库数据存放在数据文件中:从逻辑上讲,数据库则是存放在表空间中,数据管理是以表空间管理的,表空间由一个或多个数据文件 ...