我只是将我的网站文件和数据库放在Google云上。
当我通过website.appspot.com访问它时,它会显示一个空白页面。此外,我无法访问静态资源,如website.appspot.com/images/features.png
当我查看日志时,我只看到这些:
2013-11-14 20:41:12.107 /favicon.ico 200 61ms 0kb Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0 AlexaToolbar/alxf-2.19 module=default version=1
41.203.69.6 - - [14/Nov/2013:11:41:12 -0800] "GET /favicon.ico HTTP/1.1" 200 0 - "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0 AlexaToolbar/alxf-2.19" "gcdc2013-myworkset.appspot.com" ms=61 cpu_ms=0 app_engine_release=1.8.7
2013-11-14 20:41:11.549 / 404 142ms 0kb Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0 AlexaToolbar/alxf-2.19 module=default version=1
41.203.69.6 - - [14/Nov/2013:11:41:11 -0800] "GET / HTTP/1.1" 404 26 - "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/25.0 AlexaToolbar/alxf-2.19" "gcdc2013-myworkset.appspot.com" ms=142 cpu_ms=0 cpm_usd=0.000003 loading_request=1 app_engine_release=1.8.7 instance=00c61b117ceec79a7aa048437e41f62f131610
I 2013-11-14 20:41:11.548
This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application.
这是我的app.yaml
的内容application: gcdc2013-myworkset
version: 1
runtime: php
api_version: 1
handlers:
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico
- url: .*
script: index.php
- url: /
script: index.php
- url: /index\.php
script: index.php
- url: /features
script: features/index.php
- url: /about
script: about/index.php
- url: /oauth2callback/?
script: signup.php
- url: (.*)\.[\d]{10}\.(css|js)
static_files: $1.$2
upload: (.*).(.*)
- url: /css
static_dir: css
- url: /js
static_dir: js
我到底错过了什么?
新APP.YAML
application: gcdc2013-myworkset
version: 1
runtime: php
api_version: 1
handlers:
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico
- url: /features
script: features/index.php
- url: /about
script: about/index.php
- url: /css
static_dir: css
- url: /images
static_dir: images
- url: /js
static_dir: js
- url: /
script: index.php
- url: /index.php
script: index.php
- url: (.*).php
script: $1.php
- url: /oauth2callback/?
script: signup.php
#- url: (.*)\.[\d]{10}\.(css|js)
# static_files: $1.$2
# upload: (.*).(.*)
答案 0 :(得分:1)
除了你应该移动到app.yaml文件底部的。*之外,删除所有指向index.php脚本的条目。
正在发生的事情是您的。*条目符合所有请求,因此下方的条目永远不会被处理。