Apache2.4中出现You don't have permission to access / on this server.

注意Apache2.4跟以前版本配置不一的啊,弄了我很久

在配置apache工作出错:You don‘t have permission to access / on this server.

默认的apache的工作目录为:/usr/local/apache2/htdocs/

现在想修改为:/www

除了要修改:/usr/local/apache2/conf/http.conf文件中的工作目录:DocumentRoot "/www"外,记得要把对应的工作目录权限的地址一并修改过来,例如

DocumentRoot "/www"                                          //工作目录

Directory "/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 None//工作目录需要的权限

#

# Controls who can get stuff from this server.

#

Require all granted//工作目录需要的权限

</<b>Directory

修改好,运行,ok

版权声明:本文为博主原创文章,未经博主允许不得转载。

Apache2.4中出现You don't have permission to access / on this server.

时间: 2024-08-28 09:46:15

Apache2.4中出现You don't have permission to access / on this server.的相关文章

Apache 2.4权限设置( you don&#39;t have permission to access / on this server Apache2.4)

摘要 you don't have permission to access / on this server Apache2.4 Apache 从2.2升级到 Apache2.4.x 后配置文件 httpd.conf 的设置方法有了大变化,以前是将 deny from all 全部改成 Allow from all 实现外网访问,现在是将 Require all denied 以及 Require local 都该为 Require all granted 就可以了. .htaccess 如果

对于搭建网站中出现“You don&#39;t have permission to access this resource.”错误提示的解决思路

我是用的是树莓派搭载了ubuntu系统 配置php+apache的网站环境,但在登陆网站进行网站初始化设置时出现错误提示,其大意是没有访问权限,上网搜索了一系列相关教程,都说明对apache2.conf配置等配置文件进行修改,但并没有解决问题. 还是从错误提示本身出发+“没有访问此资源的权限”,那么可以尝试给www文件夹下的所有文件给予一定的权限(注意!这里是所有文件,包括子目录),之前我是用的sudo chmod 777 /www 并没有解决问题,打开了其目录下的任意子目录,发现文件权限并没有

server下apache2.4.*虚拟主机配置Forbidden You don&#39;t have permission to access / on this server.

前言: 继前面两节笔记之后,在配置一个虚拟主机时,这中间却遇见了一个问题,这里需要描述做一下笔记,刚刚安装的是Ubuntu server,apt-get下来的apache的版本是2.4.7,之前一直用的是apache2.2的,期间遇见过403错误,只是问题处理的方式方法有些不一样,于是这里就一时没有找到头绪.本文原创博客地址:http://www.cnblogs.com/unofficial官网地址:www.pushself.com) 403:没有权限访问 不说废话直接找主题: 首先我们来回顾一

apache2.4 You don‘t have permission to access / on

apache2.4 You don't have permission to access / on this server. 在配置完apache2.4conf/extra/httpd-vhosts.conf 添加完虚拟主机后以及本地windows/system32/drivers/etc/host.conf 进行域名解析后 去到Apacheconf/httpd.conf大概是231行的位置修改<Directory />AllowOverride noneRequire all no<

Apache2.2和Apache2.4中httpd.conf配置文件 权限的异同

Windows环境从Apache2.2改成Apache2.4后httpd.conf中的设置异同. 1.权限设定方式变更 2.2使用Order Deny / Allow的方式,2.4改用Require apache2.2: Order deny,allow Deny from all apache2.4: Require all denied 此处比较常用的有如下几种: Require all denied Require all granted Require host xxx.com Requ

Access and SQL Server 中的表转置

样表如下: Student ID sName Subject Score 1 张三 Chinese 80 2 张三 Math 90 3 张三 English 85 4 李四 Chinese 85 5 李四 Math 92 6 李四 English 82 Access: TRANSFORM Avg(Student.Score) AS ScoreOfAvgSELECT Student.sNameFROM StudentGROUP BY Student.sNamePIVOT Student.Subje

mac 中/Users/sfx/.config/git/attributes&#39;: Permission denied

sudo chown -R sfx /Users/sfx/.config 即sfx 创建的用户 其中sfx 是我的,每个人都不一样.在终端把这个命令复制进去,点一下,就解决了. mac 中/Users/sfx/.config/git/attributes': Permission denied 原文地址:https://www.cnblogs.com/smallleiit/p/12336185.html

apache2.4中输入网址未能指向index

在apache的httpd.conf文件中第283行位置<IfModule dir_module>DirectoryIndex index.html</IfModule>写入index.php即为:<IfModule dir_module>DirectoryIndex index.html index.php</IfModule> 原文地址:http://blog.51cto.com/13757802/2138923

虚拟机centOS中安装Redis,主机Redis Destop Manager不能访问虚拟机Redis server的解决方案

今天在学些redis的时候碰到个问题,发现主机Redis Destop Manager不能访问虚拟机Redis server的解决方案,找了一些网上的资料,原因可能有两个,整理记录下来: 1. Redis.conf文件中打开了 # By default Redis listens for connections from all the network interfaces# available on the server. It is possible to listen to just on