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 ...
随机推荐
- 使用weui
1 在https://github.com/weui/weui-wxss/下载项目,得到weui.wxss文件 2 把文件放在小程序项目的根目录下 3 在app.wxss中引用weui.wxss文件 ...
- java.lang.ClassCastException: java.util.HashMap cannot be cast to java.lang.String
问题背景:从前端传来的json字符串中取某些值,拼接成json格式入参调外部接口. 报如下错: java.lang.ClassCastException: java.util.HashMap cann ...
- Bean的不同配置方式比较与应用场景
基于XML配置 Bean的定义: 在XML文件中通过<bean>元素定义. Bean的名称: 通过<bean>的id或name属性定义. ...
- 2、css的存在形式及优先级
一.优先级 简单可以理解为就近原则: <html lang="en"> <head> <meta charset="UTF-8"& ...
- Flutter实战视频-移动电商-49.详细页_Stack制作底部工具栏
49.详细页_Stack制作底部工具栏 一直悬浮在最下面的 Stack层叠组件.里面用Row 可以横向布局 开始 stack如果想定位就要用position去定位. 修改return返回值的这个地方 ...
- CodeForces - 767C Garland 树的遍历
C. Garland time limit per test 2 seconds memory limit per test 256 megabytes input standard input ou ...
- node-sass安装失败
1. 直接安装报错(版本根据自己需求来) npm i node-sass@ -D 报错不能下载 win32-x64-64_binding.node Downloading binary from ht ...
- 进击python第4篇:初探模块
模块,用一砣代码实现了某个功能的代码集合,任何python程序都可以作为模块导入,n个 .py 文件组成的代码集合就称为模块. but 为什么要引入模块概念?主要原因是代码重用(code reuse) ...
- Codevs 1141 数列
1141 数列 题目描述 Description 给定一个正整数k(3≤k≤15),把所有k的方幂及所有有限个互不相等的k的方幂之和构成一个递增的序列,例如,当k=3时,这个序列是: 1,3,4,9, ...
- (转)cookie和session的区别
转自 http://www.cnblogs.com/shiyangxt/archive/2008/10/07/1305506.html http://justsee.iteye.com/blog/15 ...