Google App Engine 中使用 staticdir 时出现 403 错误

发布于 2024-08-10 19:37:22 字数 518 浏览 1 评论 0原文

由于某种原因,我无法让 static_dir 工作。在我的 app.ymal 中,我有:

-   url: /ui
    static_dir: ui

-   url: /dump
    static_dir: dump

从 /ui 加载静态文件有效(即 /ui/images/logo.png)。但是当我尝试从 /dumo 访问某些内容时,我只是得到:

INFO     2009-11-12 14:03:55,497 dev_appserver.py:3034] "GET /dump/kaxas.zip HTTP/1.1" 403 -

如果我将 zip 文件的名称更改为其他名称,则会返回 404 错误。所以它以某种方式找到了该文件。

在服务器上,文件具有相同的所有者和组以及相同的权限 (chmod 755)。

我在 Linux 服务器上运行 dev_appserver 。

有什么想法吗?

..弗雷德里克

For some reason I can't get static_dir to work. In my app.ymal I have:

-   url: /ui
    static_dir: ui

-   url: /dump
    static_dir: dump

Loading static files from /ui works (i.e /ui/images/logo.png). But when I try to access something from /dumo I just get:

INFO     2009-11-12 14:03:55,497 dev_appserver.py:3034] "GET /dump/kaxas.zip HTTP/1.1" 403 -

If I change the name of the zip-file to something else it returns a 404 error. So in someway it finds the file.

On the server the files have the same owner and group, and the same rights (chmod 755).

I'm running dev_appserver on a linux server.

Any ideas?

..fredrik

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

撑一把青伞 2024-08-17 19:37:22

GAE 通常会因配额问题而返回 HTTP 403 代码,请参阅 http://code.google .com/appengine/docs/quotas.html

我认为您的 zip 文件超过 1 MB,而且我读到它不允许这么大的 zip 文件。尝试使用较小的文件以确保转储正常工作,我认为它会起作用。

HTTP 403 code is usually returned by GAE for quota problems, read http://code.google.com/appengine/docs/quotas.html

I think your zip file is more than 1 MB, and I have read it doesn't allow such big zip files. Try with a smaller file to make sure dump is working, I think it will work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文