当前位置: 首页 > 知识库问答 >
问题:

处理程序未找到AppEnginestatic_files

陈松
2023-03-14
application: fooapp
version: 1
runtime: python27
api_version: 1
threadsafe: true

handlers:
- url: /
  static_files: static/index.html
  upload: static/upload

- url: /lib
  static_dir : static/lib

- url: /resources
  static_dir : static/resources

- url: /foo.js
  static_files : static/foo.js
  upload: static/upload

使用上述配置,我能够在localhost启动应用程序使用dev_appserver.py.它localhost:8080index.html静态文件夹内提供服务。然而,当我部署应用程序时,fooapp.appspot.com结果为404。我在日志中看到下面的消息。未找到处理程序引用的静态文件:静态/index.html

共有1个答案

吴涵育
2023-03-14

将yaml更改为“以下”有效。

application: fooapp
version: 1
runtime: python27
api_version: 1
threadsafe: true

handlers:
- url: /lib
  static_dir : static/lib

- url: /resources
  static_dir : static/resources

- url: /app.js
  static_files : static/app.js
  upload: static/app.js

- url: /
  static_files: static/index.html
  upload: static/index.html
 类似资料:
  • 我试图使用Spring设置JAX-WS客户端。我有下面的bean定义。获取下面的错误。 引起原因:org.springframework.beans.factory.CannotLoadBeanClassExcema:错误加载类[org.springframework.remoting.jaxws.JaxWsPortProxyFactoryBean]的bean名称'某位客户端'定义在Servlet

  • 当我使用Anable取消存档文件时,发生了以下错误: 找不到要取消归档的处理程序。确保安装了提取文件所需的命令。 有没有一个解决方案,而不安装所需的模块(gtar/解压缩)。

  • 问题内容: 嗨,我收到尝试通过php文件连接到sqlite时 找不到驱动程序 错误的消息。我已将权限设置为777 … PHP 5.2.16版,已安装模块。任何找不到驱动程序的原因,php.ini都显示了已安装的扩展名pdo.so和pdo_mysql.so。 PDO 已启用PDO支持的PDO驱动程序mysql pdo_mysql 适用于MySQL的PDO驱动程序,客户端库版本5.0.92 问题答案:

  • 我正在使用带有thymeleaf的Spring Boot,我所有的资源都在Spring应用程序之外的路径上,例如。在dev env上应该使用url解析路径,并且live env继续路径。 为什么资源处理程序不处理这些类型的资源,但是如果我处理没有问题?我错过了什么吗? 编辑:如果是并且位置是url也没有被处理

  • 在处理中,我有以下错误: 我正在尝试运行“exemplePPhys2D_geeknessrain.pde”,可以在 https://projets.pingbase.net/libro/projects/hub/repository/revisions/7/entry/EXEMPLES/pphys2d/examples/exemplePPhys2D_geeknessrain/exemplePPhy

  • 问题内容: 好的,这是什么,为什么它会在Win2003服务器上而不是在WinXP上发生。 它似乎根本不影响我的应用程序,但是当我关闭应用程序时收到此错误消息。而且很烦人(因为错误消息应该如此)。 我正在使用pyOpenGl和wxPython做图形工作。不幸的是,我是一个接管了这个Python应用程序的C#程序员,我必须学习Python才能做到这一点。 我可以提供代码和版本号等,但是我仍在学习技术知