1

我很难找到一种方法将我的 php 应用程序/脚本迁移到谷歌的 appengine。我认为这一切都源于 app.yaml。

当我访问 localhost:9080 时,它会重定向如下所示:

http://localhost:9080/index.php/admin/index.php/admin/index.php/admin/index.php/admin/index.php/admin/index.php/admin/index.php/admin/index.php/admin/index.php/admin/index.php/admin/index.php/admin/index.php/admin/index.php/admin/index.php/admin/index.php/admin/index.php/admin/index.php/admin/index.php/admin/index.php/admin/index.php/admin/index.php/admin/login

什么问题,我该如何解决?我尝试了 wordpress 之类的示例,它们都可以工作,但没有太多解释 app.yaml 是如何派生的。特别是,如果我们采用 phpscript,如何轻松迁移到 google appengine,迁移路径指南/教程会很有帮助。

无论如何,这是我的 app.yaml

application: phptestapp
version: 1
runtime: php
api_version: 1
threadsafe: yes

handlers:
- url: /favicon\.ico
static_files: favicon.ico
upload: favicon\.ico

- url: /.*
  script: index.php
4

2 回答 2

2

是在 app.yaml 中配置脚本处理程序的链接 - LMK 对此文档有什么不清楚的地方。

在不了解您的应用的情况下,很难知道您的 app.yaml 应该是什么样子。

我猜你的脚本 index.php 正在重定向到 admin/index.php 的脚本,但你没有处理程序。也许您的 app.yaml 需要

handlers:
- url: /favicon\.ico
  static_files: favicon.ico
  upload: favicon\.ico

- url: (.+).php
  script: \1.php

- url: /.*
  script: index.php

因此,如果您有任何指定确切脚本文件的 url,它将执行该脚本 - 就像我说的那样,我在猜测您的应用程序应该做什么。

于 2013-12-22T20:43:17.053 回答
2

Fwiw 我刚刚遇到了类似的事情,试图在 App Engine 上启动并运行一个测试 WordPress 实例。

访问http://localhost:10080最终到达这里——http://localhost:10080/wordpress/wp-admin/install.php出现重定向循环错误。

但是直接去这里http://localhost:10080/wp-admin/install.php——效果很好。

于 2014-03-17T19:01:23.503 回答