you don't have permission to access / on this server解决
项目部署到Apache Http Server上面,通过apachectl -t 检测配置文件也没有问题。可是通过浏览器访问,却出现了“you don't have permission to access / on this server”.
项目部署到Apache Http Server上面,通过apachectl -t 检测配置文件也没有问题。可是通过浏览器访问,却出现了“you don't have permission to access / on this server”.
1、首先,查看conf.d/python.conf文件
<Directory "项目路径">
Options Indexes FollowSymLinks +Includes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
上面标红部分,表示允许任何人访问目录
2、其次,既然配置文件没有问题,那就需要考虑http.conf文件中指定的用户和组的访问权限。在Apache的wiki上有关于PermissionDenied的解决方法,链接是http://wiki.apache.org/httpd/13PermissionDenied,译文如下:
Error 13 指的是文件系统的访问权限错误。也就是由于错误的权限,apache被拒绝访问。一般的来说,这并不意味着是Apache配置文件存在错误。
为了给文件提供服务,Apache必须有适当的权限去访问那些文件,这些权限是由操作系统授予的。特别是在httpd.conf文件中指定User或者Group必须能够读取所有被服务的文件,以及查找包含那些文件的目录和所有的父目录直至文件系统的根。
一个类unix操作系统上不属于httpd.conf文件中指定的User或Group的资源的典型访问权限,对于普通的文件是644 -rw-r--r--,对于文件夹或者CGI脚本是755 drwxr-x-r-x。你也可能需要去查看操作系统所支持的扩展的访问权限(例如SELinux访问权限).
例子
当访问类unix操作系统上的/usr/local/apache2/htdocs/foo/bar.htm文件时,你收到了Permission Denied的错误。
首先,查看文件的访问权限:
$ cd /usr/local/apache2/htdocs/foo
$ ls -l bar.htm
如果须要的话,就修复它们:
$ chmod 644 bar.html
对文件夹以及每个父文件夹做相同的操作(/usr/local/apache2/htdocs/foo,/usr/local/apache2/htdocs,/usr/local/apache2,/usr/local/,/usr):
$ ls -la
$ chmod +x
$ cd ..
$ #repeat up to the root
在一些系统上,可使用工具namei来列出各个路径上的不同组件的访问权限,然后去发现是否有权限问题:
$ namei -m /usr/local/apache2/htdocs/foo/bar.html
3、最后,如果还是没有解决问题,那么需要查看扩展的访问权限。
使用setenforce 0关闭SELinux,看是否解决问题。
我遇到的问题是http.conf文件中所指定的用户没有访问项目所在目录的权限。
you don't have permission to access / on this server解决的更多相关文章
- phpstudy 产生You don't have permission to access / on this server.解决
phpstudy配置好访问目录时候有时候会产生You don't have permission to access / on this server. 解决办法: 修改服务器httpd.conf配置 ...
- 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 ...
- wampserver You don't have permission to access / on this server. 解决 方法(转,正好碰到这样的事情了就转下来)
最近在安装最近版wampserver 2.2 d时发现安装好后启动服务器,访问localhost显示You don't have permission to access / on this serv ...
- 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列 ...
- wampserver You don't have permission to access / on this server. 解决方法
最近在安装最近版wampserver 2.2 d时发现安装好后启动服务器,访问localhost显示You don't have permission to access / on this serv ...
- mac osx Forbidden You don't have permission to access / on this server解决方法
(1)首先查看*.conf 是否有读写权限,如果没有要将文件赋予读写权限,比如 localhost.conf (2)再查看/Users/username/Sites/localhost/文件夹是否有i ...
- localhost访问错误Forbidden You don't have permission to access / on this server.解决办法(亲测)
在httpd.conf文件下找到这段: <Directory /> Options FollowSymLinks AllowOverride None Order deny,allow D ...
- Forbidden You don't have permission to access / on this server. You don't have permission to access /phpmyadmin/ on this server. 解决办法
Forbidden You don't have permission to access / on this server. 解决办法 打开 httpd.conf 文件, 将 # onli ...
- 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 ...
随机推荐
- C++之static类成员,static类成员函数
0.static修饰类中成员,表示类的共享数据 1.static类成员 在C++primer里面说过,static类成员不像普通的类数据成员,static类数据成员独立于一切类对象处在.static类 ...
- Azure Key Vault (1) 入门
<Windows Azure Platform 系列文章目录> 为什么要使用Azure Key Vault? 我们假设在微软云Azure上有1个场景,在Windows VM里面有1个.NE ...
- 九、myeclipse开发背景保护色设置
window->preferences->Editors->Text Editors->Background color 背景颜色向你推荐: 色调:85.饱和度:1 2 3.亮 ...
- Asset Catalog Help (十一)---Removing Images and Sets
Removing Images and Sets Optimize the size of an asset catalog by removing unused images or sets. 通过 ...
- 大白话5分钟带你走进人工智能-第二十九节集成学习之随机森林随机方式 ,out of bag data及代码(2)
大白话5分钟带你走进人工智能-第二十九节集成学习之随机森林随机方式 ,out of bag data及代码(2) 上一节中我们讲解了随机森林的基本概念,本节的话我们讲解随机森 ...
- hexo添加新菜单并实现新菜单的文章归类
1.添加收藏夹菜单,新建一个页面,命名为 favorite,命令如下: hexo new page favorite ## 然后就可以看到在source下多了一个favorite的文件夹,里面有一个i ...
- Spring Cloud:使用Ribbon实现负载均衡详解(下)
在上一篇文章(Spring Cloud:使用Ribbon实现负载均衡详解(上))中,我对 Ribbon 做了一个介绍,Ribbon 可以实现直接通过服务名称对服务进行访问.这一篇文章我详细分析一下如何 ...
- PHP实现用户登录页面
PHP学习日常,放在上面记录一下咯 我用了bootstrap框架,这样的界面要好看一点 登录页面: 必须用户名.密码.验证码都输入正确才能登录成功喔,否则出现下面提示 登陆成功之后,登录和注册选项切换 ...
- SpringBoot2.0 整合 RocketMQ ,实现请求异步处理
一.RocketMQ 1.架构图片 2.角色分类 (1).Broker RocketMQ 的核心,接收 Producer 发过来的消息.处理 Consumer 的消费消息请求.消息的持 久化存储.服务 ...
- GoldenGate对接 mysql
环境: centos 7.4 mysql 5.5.58 glibc 64 位版,下载链接:https://dev.mysql.com/downloads/mysql/5.5.html#download ...