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 FollowSymLinksAllowOverride NoneOrder deny,allowDeny from all </Directory>
将之修改为
- <span style="font-size: x-small;"># 允许指向外部的目录进行访问
- <Directory />
- Options Indexes FollowSymLinks
- AllowOverride None
- </Directory></span>
# 允许指向外部的目录进行访问 <Directory />Options Indexes FollowSymLinksAllowOverride None </Directory> <Directory /> Options Indexes FollowSymLinks ExecCGI AllowOverride None </Directory>
然后重启apache,就ok了。
转载于:https://www.cnblogs.com/yasuo/p/5477509.html
Apache提示You don't have permission to access / on this server问题解决相关推荐
- Apache提示You don‘t have permission to access / on this server问题解决
Apache提示You don't have permission to access / on this server问题解决 参考文章: (1)Apache提示You don't have per ...
- 【Apache】You don't have permission to access / on this server.问题解决
目录 背景 正文 总结 背景 在服务器中输入localhost出现 Forbidden,You don't have permission to access / on this server. 在外 ...
- 输入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提示“You don‘t have permission to access...“错误
目录 解决Apache提示"You don't have permission to access..."错误 解决Apache提示"You don't have per ...
- apache 提示You don't have permission to access /test.php on this server.怎样解决
关键字: Apache 403 Forbidden 系统配置: 操作系统:Red Hat Linux 6.2 Web服务器:Apache 3.1.1+jakarta-tomcat 3.1.1 数 ...
- Linux Centos7 Apache 访问 You don't have permission to access / on this server.
折腾了很久,今天才找到了最正确的答案.感言真不容易. 百度出来的99%都是采集的内容,全都是错误的. You don't have permission to access / on this ser ...
- You don't have permission to access / on this server提示 求解决办法~
提示You don't have permission to access / on this server..Apache定义了默认对网站根的访问权限. # Each directory to wh ...
- [备忘][转载]apache 403错误 You don't have permission to access on this server
apache 403错误 You don't have permission to access on this server. 在配置好了Apache服务器后,测试已经通过了,但是通过浏览器访问lo ...
- 问题解决:Apache: You don't have permission to access / on this server
虚拟主机(Virtual Host)是指在一个机器上运行多个网络站点 (比如:www.company1.com和www.company2.com). 如果每个网络站点拥有不同的IP地址,则虚拟主机可以 ...
- (已解决)wamp + Apache报错:出现403Forbidden You don't have permission to access / on this server.
文章目录 `解决办法:` `*** `附件 · 延伸阅读 · 参考: 解决办法: 注意: 案例环境:win7 x64 或 win10 仅仅只需要修改apache配置文件httpd.conf 即可. 上 ...
最新文章
- 用简单的例子说明提升可复用性的设计模式
- 《犯罪心理学》读书笔记(part7)--犯罪心理的主观差异(中上)
- 在浏览器控制台执行以下代码,输入的结果是()
- java 写oracle clob_Java将数据写入Oracle的Clob字段中
- grep命令与正则表达式
- 快捷键截屏_Windows10自带截屏快捷键使用方法大全
- yii2 mysql 队列_yii2.0 中的队列
- 腾讯WebQQ 3.0 密码、验证码加密算法分析
- 《jdk8u源码分析》jvm.dll接口列表
- worder字体网页字体对照表
- 【面试】阿里巴巴Java经典面试题整理及答案详解
- 计算机科学与技术考研吧,计算机科学与技术考研学校排名
- 北京林业大学matlab公选课,北京林业大学视频类公共选修课学习指引-北京林业大学教务处.DOC...
- macos下安装john the ripper并配置zip2john
- An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.
- telegram协议构架能实现朋友圈或者新浪微博功能么?
- 郭德纲的网络效应和网络利用
- 网络安全初学者工具安装:Kali,Windows xp虚拟机,pikachu靶场,burpsuite安装配置,phpstudy安装(学习笔记)
- USB转RS422带隔离电路设计(CAIS3082W替代方案)
- 支付宝/云闪付个人免签