gpt4 book ai didi

python - AWS Elastic Beanstalk 上的 Django 403 禁止访问

转载 作者:太空狗 更新时间:2023-10-30 01:28:00 31 4
gpt4 key购买 nike

我正在学习在 AWS 上部署 Django 应用程序的教程。来源我正在使用 http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html

我收到以下错误:

[Tue Feb 23 21:05:22.883666 2016] [core:error] [pid 3394] (13)Permission denied: [client 172.31.46.155:37871] AH00035: access to / denied (filesystem path '/opt/python/current/app/mysite/wsgi.py') because search permissions are missing on a component of the path

我的网页显示:

禁止

您无权访问此服务器上的/。

这是我的文件路径:

virtualenvFolder
- requirements.txt
mysite
-db.sqlite3.db
-manage.py
mysite
-__init__.py
-__init__.pyc
-settings.py
-settings.pyc
-urls.py
-urls.pyc
-wsgi.py
-wsgi.pyc
.ebextensions
-django.config
.elasticbeanstalk
-config.yml

要求.txt:

Django==1.9.2
MySQL-python==1.2.5

django.config:

option_settings:
aws:elasticbeanstalk:container:python:
WSGIPath: mysite/wsgi.py

配置文件:

branch-defaults:
default:
environment: django-env
group_suffix: null
global:
application_name: mysite
default_ec2_keyname: my-keypair
default_platform: python2.7
default_region: us-west-2
profile: eb-cli
sc: null

注意:我没有编写或更改 config.yml 它是自动生成的。

最佳答案

这与 Django 无关,与 Apache 和文件权限有关。看起来您将 Django 应用程序存储在 Apache 进程无权访问的目录中。

请参阅this question寻求解决方案。

关于python - AWS Elastic Beanstalk 上的 Django 403 禁止访问,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35588664/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com