簡體   English   中英

AppEngine功能可在本地開發服務器上使用,但不能在實時Web服務器上使用

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

我已經建立了一個AppEngine帳戶來托管一個基於WorldKit的地圖項目http://worldkit.org/幾乎可以使用它 ,但是我無法使用的最后一件事是地圖注釋功能,這是一個很大的功能我希望實現的一部分。 起初,我認為這可能是由於WorldKit下載隨附了一些PHP腳本,而且我知道GAE不會托管PHP,但是我一直在系統地從默認程序包中刪除程序段,直到我離開為止。只有.html,.css,.xml,.js,圖像文件和一個.swf作為主要應用程序。 奇怪的是,注釋可以使用本地開發服務器完美地工作,但是當我實時部署注釋時,地圖顯示得很好,沒有注釋。 注釋是通過GeoRSS提要提供給應用程序的,目前我將其作為靜態只讀文件提供,但我可能會看到將來對其進行實時更新。 這是我的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

我所有的靜態文件都包含在“靜態”目錄的子文件夾中。 為了更好地了解應用程序的工作方式,.swf對象訪問用於渲染地圖的圖像文件。 然后,它訪問rss feed來呈現注釋,這些注釋是我在靜態xml文件中創建的,並與.swf放在同一目錄中。 rss供稿包含坐標,標題,描述和用作地圖標記的圖標。 所有地圖圖塊均正確顯示,但所有注釋均不顯示。 基於嘗試在本地重現此文件,它很可能意味着.swf無法訪問位於同一文件夾中的.xml文件。 我不確定我還能提供什么其他信息,但是也許文件沒有正確上傳,或者是否有奇怪的權限阻止了事情? 它在開發服務器中工作,但不是在真實的東西上工作,這很奇怪和令人沮喪。

這是一篇有關如何使用和讀取GAE日志文件的技術文章的鏈接-當我們從開發人員轉到生產時,我們還遇到了神秘的權限問題,通過使用詳細的日志記錄,我們可以解決此問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM