Apache: You don't have permission to access / on this server
当我们需要使用Apache配置虚拟主机时,有可能会出现这个问题:Apache: You don't have permission to access / on this server
# 同IP不同域名
# Listen for virtual host requests on all IP addresses
NameVirtualHost *: <VirtualHost *:>
DocumentRoot "D:/lamp/phpweb/full"
ServerName full.thinkphp.com
</VirtualHost> <VirtualHost *:>
DocumentRoot "D:/lamp/core"
ServerName core.thinkphp.com
# Other directives here
</VirtualHost> <Directory "D:/lamp/core">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
我们使用上面的配置来实现基于不同域名的多站点配置,如果我不添加最后一段红色字体的部分,就会出现上面的问题,因为这部分的意思是
#
# 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>
这是Apache配置文件中的一段,大概意思就是'每一个Apache有权限访问的目录都需要配置,指定那个目录下的哪个服务是被允许的或者不被允许的',而默认是不能被访问的。
这里就找到了上面那个问题的原因了,如果我没有添加那段红色的字体部分,就表示,那个目录是不被允许访问的,所以就出现403错误。
注意:为什么第一个域名就不需要配置,那是因为,它放在'ServerRoot'目录下,所以是允许访问的。而第二个目录不在'ServerRoot'目录下,所以需要另外指定它允许的权限。
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 转自:http://blog.csdn.net/crazyboy20 ...
- 问题解决:Apache: You don't have permission to access / on this server
虚拟主机(Virtual Host)是指在一个机器上运行多个网络站点 (比如:www.company1.com和www.company2.com). 如果每个网络站点拥有不同的IP地址,则虚拟主机可以 ...
- Mac apache You don't have permission to access / on this server.
在mac下配置完apache和php环境后,通过localhost访问页面,出现403Forbidden.页面提示: Forbidden You don't have permission to ac ...
- apache You don't have permission to access / on this server.无权访问
环境:ubuntu16.4 apache2 原因:修改了apache web项目路径 解决: 1. 修改 /etc/apache2/sites-available/000-default.conf 文 ...
- WampServer phpadmin apache You don't have permission to access
1.Forbidden You don't have permission to access / on this server. 后来咨询了一下朋友(php高手),说修改一下php的配置文件http ...
- Apache提示You don't have permission to access / on this server问题解决
测试时遇到将一本地目录设置为一apache的虚拟主机,在httpd-vhosts.conf文件中进行简单设置,然后在hosts文件中将访问地址指向本地,启动apache,进行访问,却出现了You do ...
- apache出现You don’t have permission to access / on this server问题的解决
今天在部署一个系统时,在apache中新开了一个VirtualHost,然后设置了DocumentRoot,等访问时却提示“You don’t have permission to access / ...
- apache出现You don't have permission to access / on this server. 提示
今天在新的linux上跑原来的代码,使用的虚拟主机的模式进行操作.几个相关的网站放在一个文件里,想法是通过网站列出的目录进行相应的网站进行操作.一切设置完成后,在浏览器中运行出现在You don't ...
- 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 ...
随机推荐
- OCP升级(3.6->3.7)
有个好文档还是靠普很多,感谢同事的文档.升级步骤记录如下 1.检查现有环境 [root@master ~]# etcd --version etcd Version: Git SHA: 1674e68 ...
- 一、Hello Spring Boot
package com.ld.controller; import org.springframework.web.bind.annotation.RequestMapping; import org ...
- 远程访问ubuntu下mysql的问题
ubuntu下mysql不能用IP地址远程访问的问题解决 方法1: 1.mysql>grant all privileges on *.* to 'root'@'%' identified by ...
- Because, since, as, for
because, as, for, since这几个词都是表示“原因”的连词,语气由强至弱依次为:because→since→as→for;其中because, since, as均为从属连词,引导原 ...
- Spark SQL 代码简要阅读(基于Spark 1.1.0)
Spark SQL允许相关的查询如SQL,HiveQL或Scala运行在spark上.其核心组件是一个新的RDD:SchemaRDD,SchemaRDDs由行对象组成,并包含一个描述此行对象的每一列的 ...
- spfile 和用户环境变量 和export
RAC数据库环境变量设置 [oracle@rac1 ~]$ sqlplus / as sysdba SQL*Plus: Release 10.2.0.1.0 - Production on Fri ...
- 转: codereview工具之 review board 选型与实践
转:ReviewBoard代码评审实践总结 http://my.oschina.net/donhui/blog/350074 svn与review board 结合实践 http://my.oschi ...
- MongoDB之Map-Reduce -- Mongo Shell版和C#版(上)
最近有在学习MongoDB,看到了关于Map-Reduce,觉得蛮有意思的,所以在这里就记录下来作为学习笔记. 关于Map-Reduce的作用这里就引用一下官网以及另外一篇文章看到的,言简意赅. 1. ...
- python中好用的pip
1.windows/linux 下安装pip见上篇博客 http://www.cnblogs.com/Edwardzhao/p/5856924.html 2.好用的方法 pip install xxx ...
- 算法笔记_079:蓝桥杯练习 区间k大数查询(Java)
目录 1 问题描述 2 解决方案 1 问题描述 问题描述 给定一个序列,每次询问序列中第l个数到第r个数中第K大的数是哪个. 输入格式 第一行包含一个数n,表示序列长度. 第二行包含n个正整数,表 ...