403 禁止访问弹性豆浆上的静态文件

2024-04-27 20:12:32 发布

您现在位置:Python中文网/ 问答频道 /正文

我已经成功地将我的应用程序部署到弹性beanstalk上。除了引导主题之外,一切都正常。当我查看源代码并尝试访问我得到的文件的链接时。在

来源

<!-- Custom CSS -->
    <link href= "/static/css/blog-home.css" rel="stylesheet">
    <link href= "/static/css/bootstrap-datetimepicker.css" rel="stylesheet">

    <link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">

我明白了。。。在

^{pr2}$

这是我在日志中看到的

[authz_core:error] [pid 18657] [client 10.30.229.177:34675] AH01630: client denied by server configuration: /webapp, referer: http://www.evenster.io/user/user_id=2

我已经在EB上配置了属性,以便在中包含静态文件夹python.conf版在

option_settings:
  "aws:elasticbeanstalk:container:python:staticfiles":
    "/static/": "static/"

我还对整个应用程序树执行了chmod-r777,以确保文件具有权限。在

我的文件夹结构是:

app
├── __init__py.old
├── application.py
├── application.pyc
├── manage.py
├── migrations
│   ├── README
│   ├── alembic.ini
│   ├── env.py
│   ├── env.pyc
│   ├── script.py.mako
│   └── versions
│       ├── 48f38b800968_.py
│       └── 48f38b800968_.pyc
├── requirements.txt
└── webapp
    ├── __init__.py
    ├── __init__.pyc
    ├── _olddatabase.db
    ├── config.py
    ├── config.pyc
    ├── database.db
    ├── forms.py
    ├── forms.pyc
    ├── models.py
    ├── models.pyc
    ├── static
    │   ├── blog-home.css
    │   ├── bootstrap-datetimepicker.min.css
    │   ├── bootstrap-theme.min.css
    │   ├── css
    │   │   ├── blog-home.css
    │   │   ├── bootstrap-datetimepicker.min.css
    │   │   ├── bootstrap-theme.css
    │   │   ├── bootstrap-theme.css.map
    │   │   ├── bootstrap-theme.min.css
    │   │   ├── bootstrap-theme.min.css.map
    │   │   ├── bootstrap.css
    │   │   ├── bootstrap.css.map
    │   │   ├── bootstrap.min.css
    │   │   ├── bootstrap.min.css.map
    │   │   ├── toolkit.css
    │   │   └── toolkit.min.css
    │   ├── fonts
    │   │   ├── glyphicons-halflings-regular.eot
    │   │   ├── glyphicons-halflings-regular.svg
    │   │   ├── glyphicons-halflings-regular.ttf
    │   │   ├── glyphicons-halflings-regular.woff
    │   │   └── glyphicons-halflings-regular.woff2
    │   └── js
    │       ├── bootstrap-datetimepicker.min.js
    │       ├── bootstrap.js
    │       ├── bootstrap.min.js
    │       ├── jquery.js
    │       ├── moment-with-locales.min.js
    │       ├── moment.js
    │       ├── npm.js
    │       ├── scripts.js
    │       ├── toolkit.js
    │       └── toolkit.min.js
    ├── templates
    │   ├── 500.html
    │   ├── _login.html
    │   ├── _question_settings.html
    │   ├── base.html
    │   ├── create_event.html
    │   ├── create_event2.html
    │   ├── create_user.html
    │   ├── event.html
    │   ├── events.html
    │   ├── flash.html
    │   ├── index.html
    │   ├── index2.html
    │   ├── login.html
    │   ├── logout.html
    │   ├── question.html
    │   ├── questions.html
    │   ├── test.html
    │   ├── user.html
    │   ├── user_events.html
    │   ├── user_questions.html
    │   └── users.html
    ├── views.py
    └── views.pyc

Tags: pymaphtmljsstaticbootstrapmintheme