前言:Apache2.4部署django出现403 Forbidden错误最好要结合apache中的错误日志来观察出现何种错误导致出现403错误

下午百度了一下午没找到解决办法,试了n种方法,简直坑爹!

比如网页出现最多的解决办法是:

<Directory E:/wamp/Apache24/www(你的工程路径)>
           Order allow,deny
           Allow from all
       </Directory>

可惜这样改了后还是报403,最后想起来查看err.log一看报client denied by server configuration: E:/wamp/Apache24/www/www/wsgi.py,当时各种吐血呀,后来还是到开源社区找到一个网页,进去才找到解决办法

方法解决网址:https://mikegriffin.ie/blog/20140130-authz-core-error-client-denied-by-server-configuration/

正文:其实在前面已经把问题说的差不多了,就是在apache的 httpd.conf文件中添加

#添加mod_wsgi.so 模块
LoadModule wsgi_module modules/mod_wsgi.so

#工程中的wsgi文件

WSGIScriptAlias / E:/wamp/Apache24/www/www/wsgi.py

<Directory E:/wamp/Apache24/www>
    Options FollowSymlinks
    AllowOverride none
    Require all granted
</Directory>

然后重启apache,果然解决问题了,原因我这里帮忙贴出来(大致是apache2.3后改动了访问目录权限的方式吧):

I found out that mod_authz_core was introduced in Apache2.3. This changes the way that access control is declared from

  Order allow, deny
Allow from all

to :

  Require all granted

This means that the total configuration for a Directory is now something like:

  <Directory /path/to/directory>
Options FollowSymlinks
AllowOverride none
Require all granted
</Directory>

Restart apache and it'll all work nicely.

Apache2.4部署django出现403 Forbidden错误解决办法的更多相关文章

  1. 403 Forbidden是什么意思?403 Forbidden错误解决方法

    大家平常在访问不同网站的时候,偶尔会遇到出现403 Forbidden错误的情况,浏览器会给出403 Forbidden错误提示.那么,403 forbidden是什么意思呢?出现403 Forbid ...

  2. Nginx 403 forbidden的解决办法

    Nginx 403 forbidden的解决办法. 常见的,引起nginx 403 forbidden有二种原因,一是缺少索引文件,二权限问题. 1.缺少index.html或者index.php文件 ...

  3. WampServer 2.5设置外网访问/局域网手机访问(403 Forbidden错误解决方法)

    安装好wamp后,想用手机通过局域访问电脑上wamp下的网页,结果出现如下提示. (403 Forbidden)错误 1.打开http.conf文件 2.找到下图中红色方框中的onlineofflin ...

  4. nginx “403 Forbidden” 错误 解决方法

    错误的原因是缺少index.html或者index.php文件,就是配置文件中index index.html index.htm这行中的指定的文件 只需要配置时加一句  index  index.h ...

  5. Django Admin 录入中文错误解决办法

    如果报错....for column 'object_repr' at row 1.就找到此列所在表为django_admin_log,然后插入: ALTER TABLE django_admin_l ...

  6. ngnix 403 forbidden的解决办法

    1.在网站根目录下新建文件index.html.index.php. 2.主要是修改nginx的配置文件nginx.conf权限为755即可访问.

  7. nginx出现403 Forbidden错误

    问题描述:将webpack打包的react前端部署到nginx上,发现出现403 Forbidden错误 解决方案:修改nginx.conf文件,添加user root;配置

  8. [转]权限问题导致Nginx 403 Forbidden错误的解决方法

    权限问题导致Nginx 403 Forbidden错误的解决方法 投稿:junjie 字体:[增加 减小] 类型:转载 时间:2014-08-22 这篇文章主要介绍了权限问题导致Nginx 403 F ...

  9. win7 iis7.5 配置错误解决办法

    win7 iis7.5 配置HTTP 错误 404.3 在初次使用IIS7的时候经常遇到的一个错误解决办法1: 找到Visual Studio命令提示工具,运行aspnet_regiis.exe -i ...

随机推荐

  1. Using Nuget in Visual Studio 2005 & 2008

    NuGet is a Visual Studio extension that makes it easy to install and update third-party libraries an ...

  2. ActiveX(五)更好的“ActiveX”?

    前文中四篇随笔.已经可以实现 ActiveX 与 Js 无缝交互. 也就是说借用ActiveX实现更加强大的功能已经完全不是问题.但是.ActiveX 本身还有一个局限性——浏览器兼容问题.如此强大的 ...

  3. securityPolicy与安全策略等级配置

    securityPolicy配置节是定义一个安全策略文件与其信任级别名称之间的映射的集合.配置如下所示 其中name是指定映射到策略文件的命名的安全级别,一般的值有Full,Hight,Medium, ...

  4. Levenshtein Distance算法(编辑距离算法)

    编辑距离 编辑距离(Edit Distance),又称Levenshtein距离,是指两个字串之间,由一个转成另一个所需的最少编辑操作次数.许可的编辑操作包括将一个字符替换成另一个字符,插入一个字符, ...

  5. jQuery+HTML5弹出创意搜索框层

    效果体验:http://hovertree.com/texiao/jquery/26/ 本效果适用于移动设备,可以使用手机等浏览效果. 代码下载:http://hovertree.com/h/bjaf ...

  6. 绿色简单的学校登录html页面

    效果预览:http://hovertree.com/texiao/css/22/ 代码如下: <!DOCTYPE html> <html> <head> <m ...

  7. 解决EP拒绝访问注册表Global键的的问题

    问题描述   打开EP站点时出现如下Error: Message: An unhandled error has occurred. To view details about this error, ...

  8. 计蒜客_计数和数数(C语言实现)

    “伯爵说”序列如下:1, 11, 21, 1211, 111221, ...1 读作 "one 1" 或者 11.11 读作 "two 1s" 或者21.21 ...

  9. 【夯实PHP基础系列】linux下yum安装PHP APC

    Alternative PHP Cache(可选PHP缓存),依赖于 PECL扩展库 用源码方式安装,直接yum就行了:首先要安装apc的依赖包:yum install php-pear php-de ...

  10. Https网站搭建——通过https://localhost:8443访问tomcat首页

    图片大致介绍了Https浏览器与服务器握手的过程,涉及到的名词:证书.Hash算法.随机数密码.公钥加密.私钥解密.握手消息.hash验证.摘要 tomcat服务器配置可以实现https双向认证,简单 ...