谷歌应用程序引擎joomla链接没有加载

时间:2014-03-14 01:16:53

标签: php google-app-engine joomla

我最近按照以下链接上的精彩说明在Google应用引擎上运行joomla 3.2.1 http://forum.joomla.org/viewtopic.php?f=706&t=828565&p=3114492

我仍在本地运行,但遇到了加载静态文件的问题。

尽管有正确的网址,但我的静态链接都没有加载。以下是SDK日志中的代码段

Python command: /usr/bin/python2.7
INFO     2014-03-14 01:10:23,676 devappserver2.py:675] Skipping SDK update check.
WARNING  2014-03-14 01:10:23,690 api_server.py:341] Could not initialize images API; you are likely missing the Python "PIL" module.
INFO     2014-03-14 01:10:23,696 api_server.py:138] Starting API server at: http://localhost:51014
INFO     2014-03-14 01:10:23,702 dispatcher.py:176] Starting module "default" running at: http://localhost:8080
INFO     2014-03-14 01:10:23,709 admin_server.py:117] Starting admin server at: http://localhost:8001
INFO     2014-03-14 01:10:29,491 module.py:612] default: "GET / HTTP/1.1" 200 6371
INFO     2014-03-14 01:10:29,510 module.py:612] default: "GET /templates/protostar/css/template.css HTTP/1.1" 304 -
INFO     2014-03-14 01:10:29,511 module.py:612] default: "GET /joomla/media/jui/js/jquery.min.js HTTP/1.1" 404 -
INFO     2014-03-14 01:10:29,518 module.py:612] default: "GET /joomla/media/jui/js/jquery-noconflict.js HTTP/1.1" 404 -
INFO     2014-03-14 01:10:29,519 module.py:612] default: "GET /joomla/media/system/js/core.js HTTP/1.1" 404 -
INFO     2014-03-14 01:10:29,520 module.py:612] default: "GET /joomla/media/jui/js/jquery-migrate.min.js HTTP/1.1" 404 -
INFO     2014-03-14 01:10:29,522 module.py:612] default: "GET /joomla/media/system/js/tabs-state.js HTTP/1.1" 404 -
INFO     2014-03-14 01:10:29,523 module.py:612] default: "GET /joomla/media/system/js/caption.js HTTP/1.1" 404 -
INFO     2014-03-14 01:10:29,524 module.py:612] default: "GET /joomla/media/system/js/mootools-core.js HTTP/1.1" 404 -
INFO     2014-03-14 01:10:29,524 module.py:612] default: "GET /joomla/media/jui/js/bootstrap.min.js HTTP/1.1" 404 -
INFO     2014-03-14 01:10:29,525 module.py:612] default: "GET /templates/protostar/js/template.js HTTP/1.1" 304 -
INFO     2014-03-14 01:10:29,645 module.py:612] default: "GET /joomla/media/jui/js/jquery-noconflict.js HTTP/1.1" 404 -
INFO     2014-03-14 01:10:29,649 module.py:612] default: "GET /joomla/media/jui/js/jquery-migrate.min.js HTTP/1.1" 404 -
INFO     2014-03-14 01:10:29,654 module.py:612] default: "GET /joomla/media/system/js/tabs-state.js HTTP/1.1" 404 -
INFO     2014-03-14 01:10:29,658 module.py:612] default: "GET /joomla/media/system/js/mootools-core.js HTTP/1.1" 404 -
INFO     2014-03-14 01:10:29,662 module.py:612] default: "GET /joomla/media/system/js/core.js HTTP/1.1" 404 -
INFO     2014-03-14 01:10:29,666 module.py:612] default: "GET /joomla/media/system/js/caption.js HTTP/1.1" 404 -
INFO     2014-03-14 01:10:29,670 module.py:612] default: "GET /joomla/media/jui/js/bootstrap.min.js HTTP/1.1" 404 -
INFO     2014-03-14 01:10:29,692 module.py:612] default: "GET /media/jui/fonts/IcoMoon.woff HTTP/1.1" 304 -

所有这些网址都与网站上的文件结构完全对应,但它们都会在Google控制台上以404错误的形式返回!

相同的文件在Mamp上完美运行。

我的app.yaml文件就像这样

    application: demo-test
version: 1
runtime: php
api_version: 1
threadsafe: yes

handlers:
- url: /(.*\.(htm$|html$|css$|js$))
  static_files: joomla/\1
  upload: joomla/(.*\.(htm$|html$|css$|js$))
  application_readable: true
  secure: always

## Admin  
- url: /administrator(.+)
  script: joomla/administrator\1
  secure: always

## Asset folders
- url: /media
  static_dir: joomla/media
  application_readable: true

- url: /images
  static_dir: joomla/images
  application_readable: true

## Template folders
- url: /templates
  static_dir: joomla/templates
  application_readable: true

- url: /administrator/templates
  static_dir: joomla/administrator/templates
  application_readable: true

## SEO robots
- url: /robots.txt
  script: joomla/robots.txt 

## Site access
- url: /(.+)?/?
  script: joomla/index.php
  secure: always

非常感谢任何帮助。

1 个答案:

答案 0 :(得分:2)

404的传入URL以/ joomla /开头,因此在编写正则表达式时需要在处理程序中考虑到这一点。

尝试类似

的内容
handlers:
- url: /joomla/(.*\.(htm$|html$|css$|js$))
  static_files: joomla/\1
  upload: joomla/(.*\.(htm$|html$|css$|js$))
  application_readable: true
  secure: always

你真的只想通过HTTPS服务吗?如果没有,则删除secure:always line。