简体   繁体   English

AppEngine功能可在本地开发服务器上使用,但不能在实时Web服务器上使用

[英]AppEngine feature working in local dev server but not on live web server

I have set up an AppEngine account to host a WorldKit based mapping project http://worldkit.org/ I have gotten it almost working, but the one last thing I am unable to get working is the map annotations feature, which is a large part of what I hope to achieve. 我已经建立了一个AppEngine帐户来托管一个基于WorldKit的地图项目http://worldkit.org/几乎可以使用它 ,但是我无法使用的最后一件事是地图注释功能,这是一个很大的功能我希望实现的一部分。 At first, I thought it might be due to the fact that the WorldKit download comes with a few PHP scripts, and I know that GAE doesn't host PHP, but I have been systematically removing pieces from the default package until I am left with only .html, .css, .xml, .js, image files, and a single .swf which serves as the main application. 起初,我认为这可能是由于WorldKit下载随附了一些PHP脚本,而且我知道GAE不会托管PHP,但是我一直在系统地从默认程序包中删除程序段,直到我离开为止。只有.html,.css,.xml,.js,图像文件和一个.swf作为主要应用程序。 The weird part is that annotations work perfectly using the local dev server, but when I deploy it live, the map displays fine, just with no annotations. 奇怪的是,注释可以使用本地开发服务器完美地工作,但是当我实时部署注释时,地图显示得很好,没有注释。 Annotations are provided to the application via a GeoRSS feed, which for now I am providing as a static, read-only file, but I may see about updating it live in the future. 注释是通过GeoRSS提要提供给应用程序的,目前我将其作为静态只读文件提供,但我可能会看到将来对其进行实时更新。 Here is my app.yaml 这是我的app.yaml

application: parallelworldsmaps
version: 1
runtime: python
api_version: 1

default_expiration: "30d"

handlers:

- url: /(.*\.css)
  mime_type: text/css
  static_files: static/\1
  upload: static/(.*\.css)

- url: /(.*\.html)
  mime_type: text/html
  static_files: static/\1
  upload: static/(.*\.html)
  expiration: "1h"

- url: /(.*\.ico)
  mime_type: image/x-icon
  static_files: static/\1
  upload: static/(.*\.ico)
  expiration: "7d"

- url: /(.*\.js)
  mime_type: text/javascript
  static_files: static/\1
  upload: static/(.*\.js)

- url: /(.*\.json)
  mime_type: application/json
  static_files: static/\1
  upload: static/(.*\.json)
  expiration: "1h"

- url: /(.*\.m4v)
  mime_type: video/m4v
  static_files: static/\1
  upload: static/(.*\.m4v)

- url: /(.*\.mp4)
  mime_type: video/mp4
  static_files: static/\1
  upload: static/(.*\.mp4)

- url: /(.*\.(ogg|oga))
  mime_type: audio/ogg
  static_files: static/\1
  upload: static/(.*\.(ogg|oga))

- url: /(.*\.ogv)
  mime_type: video/ogg
  static_files: static/\1
  upload: static/(.*\.ogv)

- url: /(.*\.otf)
  mime_type: font/opentype
  static_files: static/\1
  upload: static/(.*\.otf)

- url: /(.*\.rss)
  mime_type: application/rss+xml
  static_files: static/\1
  upload: static/(.*\.rss)
  expiration: "1h"

- url: /(.*\.(svg|svgz))
  mime_type: images/svg+xml
  static_files: static/\1
  upload: static/(.*\.(svg|svgz))

- url: /(.*\.swf)
  mime_type: application/x-shockwave-flash
  static_files: static/\1
  upload: static/(.*\.swf)

- url: /(.*\.ttf)
  mime_type: font/truetype
  static_files: static/\1
  upload: static/(.*\.ttf)

- url: /(.*\.txt)
  mime_type: text/plain
  static_files: static/\1
  upload: static/(.*\.txt)

- url: /(.*\.webm)
  mime_type: video/webm
  static_files: static/\1
  upload: static/(.*\.webm)

- url: /(.*\.xml)
  mime_type: application/xml
  static_files: static/\1
  upload: static/(.*\.xml)
  expiration: "1h"

# image files
- url: /(.*\.(bmp|gif|ico|jpeg|jpg|png))
  static_files: static/\1
  upload: static/(.*\.(bmp|gif|ico|jpeg|jpg|png))

# audio files
- url: /(.*\.(mid|midi|mp3|wav))
  static_files: static/\1
  upload: static/(.*\.(mid|midi|mp3|wav))  

# windows files
- url: /(.*\.(doc|exe|ppt|rtf|xls))
  static_files: static/\1
  upload: static/(.*\.(doc|exe|ppt|rtf|xls))

# compressed files
- url: /(.*\.(bz2|gz|rar|tar|tgz|zip))
  static_files: static/\1
  upload: static/(.*\.(bz2|gz|rar|tar|tgz|zip))

# index files
- url: /(.+)/
  static_files: static/\1/index.html
  upload: static/(.+)/index.html
  expiration: "15m"

- url: /(.+)
  static_files: static/\1/index.html
  upload: static/(.+)/index.html
  expiration: "15m"

# site root
- url: /
  static_files: static/index.html
  upload: static/index.html
  expiration: "15m"

- url: /
  static_dir: static

All of my static files are contained in subfolders of the "static" directory. 我所有的静态文件都包含在“静态”目录的子文件夹中。 To give a little better idea of how the app works, the .swf object accesses image files which it uses to render a map. 为了更好地了解应用程序的工作方式,.swf对象访问用于渲染地图的图像文件。 It then accesses an rss feed to render the annotations, which I have created in a static xml file and placed in the same directory as the .swf. 然后,它访问rss feed来呈现注释,这些注释是我在静态xml文件中创建的,并与.swf放在同一目录中。 The rss feed contains coordinates, title, description, and an icon to be used as the map marker. rss供稿包含坐标,标题,描述和用作地图标记的图标。 All of the map tiles display correctly, but none of the annotations do. 所有地图图块均正确显示,但所有注释均不显示。 Based on attempts to reproduce this locally, it most likely means that the .swf is unable to access the .xml file which is located in the same folder. 基于尝试在本地重现此文件,它很可能意味着.swf无法访问位于同一文件夹中的.xml文件。 I'm not sure what other information I can provide, but perhaps is the file not getting uploaded correctly or are there maybe weird permissions blocking things? 我不确定我还能提供什么其他信息,但是也许文件没有正确上传,或者是否有奇怪的权限阻止了事情? It's just weird and frustrating that it's working in the dev server but not on the real thing. 它在开发服务器中工作,但不是在真实的东西上工作,这很奇怪和令人沮丧。

这是一篇有关如何使用和读取GAE日志文件的技术文章的链接-当我们从开发人员转到生产时,我们还遇到了神秘的权限问题,通过使用详细的日志记录,我们可以解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AppEngine本地开发服务器上的Braintree SDK SSLCertificateError - Braintree SDK SSLCertificateError on AppEngine local dev server 在本地开发服务器上的Google Appengine后端日志记录 - Google Appengine backend logging on local dev server 有没有办法对本地appengine开发服务器强制执行30秒限制? - is there any way to enforce the 30 seconds limit on local appengine dev server? Python脚本-在本地环境上工作,但不在Dev Server上工作 - Python Script - Working on Local Environment but not on Dev Server Google云端存储客户端无法在本地dev_server上运行 - Google Cloud Storage Client not working on local dev_server 升级到appengine dev server 1.7.6后导入simplejson时出错 - Error importing simplejson after upgrading to appengine dev server 1.7.6 ImportError:无法使用AppEngine开发服务器导入名称SignedJwtAssertionCredentials - ImportError: cannot import name SignedJwtAssertionCredentials using AppEngine dev server 在appengine上查询datetime.datetime的行为与开发服务器的帮助不同! - Querying datetime.datetime on appengine acts different then dev server help! 无法在dev_server上运行appengine-admin - cannot run appengine-admin on dev_server python运行时中Appengine开发服务器上的模块初始化错误 - Module initialization error on appengine dev server in python runtime
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM