简体   繁体   English

php运行时环境的yaml配置文件

[英]yaml configuration file for php runtime enviornment

i want to run simple html website using GAE.Please help me in writing the correct yaml configuration file for my application.When I tried to deploy this application it gives an error.However if i deploy app without new handlers ie those are not populated by app.yaml automatically it works File structure is as 我想使用GAE运行简单的html网站。请帮助我为我的应用程序编写正确的yaml配置文件。当我尝试部署此应用程序时,会出现错误。但是,如果我部署的应用程序没有新的处理程序,即未填充新的处理程序app.yaml自动工作文件结构为

css
images
js
index.html
..

and yaml file is as : 和yaml文件为:

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

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

- url: /images
  static_dir: images

- url: /js
  static_dir: js

- url: /css
  static_dir: css

- url: .*
  script: index.html

A typical app.yaml that just does static content would be arranged like this: put the static content in a subdirectory, say "htdocs". 一个典型的只处理静态内容的app.yaml的排列如下:将静态内容放在子目录中,例如“ htdocs”。 Then have a handler at the bottom as your "catch-all": 然后在底部有一个处理程序,作为“包罗万象”:

- url: /
  static_dir: htdocs

So altogether, I'd expect the following app.yaml: 因此,总的来说,我期望以下app.yaml:

application: shimlachadwick
version: 1
runtime: php
api_version: 1

handlers:
- url: /
  static_dir: htdocs

Let's say that you wanted the root path "/" to map to a index.php file that generates dynamic content (and must not be inside htdocs). 假设您希望将根路径“ /”映射到生成动态内容的index.php文件(并且不能在htdocs中)。 Then that's a matter of adding an earlier entry that maps to that index.php file: 然后,只需添加一个映射到该index.php文件的早期条目即可:

application: shimlachadwick
version: 1
runtime: php
api_version: 1

handlers:

- url: /$
  script: index.php

- url: /
  static_dir: htdocs

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM