要在Google App Engine上托管静态(HTML)网站,应该在app.yaml文件中包含哪些内容? [英] To host a static (HTML) website on Google App Engine, what should be in the app.yaml file?
本文介绍了要在Google App Engine上托管静态(HTML)网站,应该在app.yaml文件中包含哪些内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
app.yaml
内容:
$ b
应用程序:visualvidya
版本:1
运行时:python
api_version:1
处理程序:
- url:/(.*\.(gif|png|jpg|ico|js|css))
static_files:\ 1
upload:(。* \\ \\。(gif | png | jpg | ico | js | css))
解决方案<
对于一个静态网站来说, 处理程序:
- url:/
static_files:static / index.html
上传:static / index.html
- url:/
static_dir:static
每个站点都不同,所以Sean在评论中指出,您需要查阅文档。
Can I use this for uploading HTML pages?
app.yaml
contents:
application: visualvidya
version: 1
runtime: python
api_version: 1
handlers:
- url: /(.*\.(gif|png|jpg|ico|js|css))
static_files: \1
upload: (.*\.(gif|png|jpg|ico|js|css))
解决方案
A minimal handlers
section for a static site might look something like this:
handlers:
- url: /
static_files: static/index.html
upload: static/index.html
- url: /
static_dir: static
Every site is different, so as Sean pointed out in the comments, you'll want to consult the documentation.
这篇关于要在Google App Engine上托管静态(HTML)网站,应该在app.yaml文件中包含哪些内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文