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 ...
随机推荐
- linux 多线程基础2
6. 名称:: pthread_detach 功能: 使线程进入分离状态. 头文件: #include <pthread.h> 函数原形: int pthread_detach(pthre ...
- python爬虫学习(2)__抓取糗百段子,与存入mysql数据库
import pymysql import requests from bs4 import BeautifulSoup#pymysql链接数据库 conn=pymysql.connect(host= ...
- Git 使用相关
GIT命令和使用 安装git完成后,创建工程目录,右键运行bash here 1.查看git当前配置信息: git config -l 2.配置用户名.邮箱git config --global us ...
- ARC __bridge modifiers demystified
http://stackoverflow.com/questions/14207960/arc-bridge-modifiers-demystified Because I learned what ...
- Tornado源码探寻(请求到来)
上一篇中介绍了tornado框架在客户端请求之前所做的准备(下图1.2部分),本质上就是创建了一个socket服务端,并进行了IP和端口的绑定,但是未执行 socket的accept方法,也就是未获取 ...
- weekend110(Hadoop)的 第二天笔记
(2015年1月11日) 课程目录 01-NN元数据管理机制 02-NN工作机制2 03-DN工作原理 04-HDFS的JAVA客户端编写 05-filesystem设计思想总结 06-hadoop中 ...
- 个人推荐,比较好的MySQL客户端工具
关于啊,MySQL客户端,实在是太多了.本人也是正在摸索中. MySQL Workbench phpMyAdmin SQLyog Navicat for MySQL MySQL Server MySQ ...
- 【转】Flask快速入门
迫不及待要开始了吗?本页提供了一个很好的 Flask 介绍,并假定你已经安装好了 Flask.如果没有,请跳转到 安装 章节. 一个最小的应用 一个最小的 Flask 应用看起来会是这样: from ...
- switch语法中break,default作用说明
转自:http://cjhbest999.iteye.com/blog/1137124 关于java中switch使用的一些说明 switch(表达式) { case 常量表达式1:语句1; .... ...
- String和StringBuilder作为参数的区别
先见下面实例: public class TestDemo { @Test public void test(){ //String str = "hello"; String s ...