Apache2.4 Deploying Django 403 Forbidden Error Resolution

Source: Internet
Author: User
Tags scalar 403 forbidden error

Foreword: Apache Deployment Django appears 403 Forbidden error best to combine the error log in Apache to observe what error caused a 403 error

The afternoon Baidu did not find a solution, tried n method, simply pit Dad!

For example, the most likely solution to a webpage is:

<directory e:/wamp/apache24/www (your project path) >
Order Allow,deny
Allow from all
</Directory>

Unfortunately this changed after still reported 403, finally remembered to view Err.log a newspaper client denied by Server configuration:e:/wamp/apache24/www/www/wsgi.py, then all kinds of vomiting blood ah, Then we went to the open source community to find a Web page to find a solution.

Method Resolution URL:https://mikegriffin.ie/blog/20140130-authz-core-error-client-denied-by-server-configuration/

Text: In fact, in front of the problem has been said to be similar, is in the Apache httpd.conf file added

#添加mod_wsgi. So module
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>

Then restart Apache, did solve the problem, the reason I put it here (roughly apache2.3 after the change of access to the directory permissions of the way it):

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

  Order allow, deny  Allow from all

To:

  Require all granted

This means, the total, configuration for a are now Directory something like:

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

Restart Apache and it ' ll all work nicely.

Apache2.4 Deploying Django 403 Forbidden Error Resolution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.