【发布时间】:2018-07-04 20:38:38
【问题描述】:
我在 Google App Engine 上将 Flask 应用设置为 Flex 项目。 当我浏览到 https://{project-id}.appspot.com 时,一切正常,我可以毫无问题地使用该应用程序。为什么我会收到 404?
我将自定义域设置为 host.mydomain.io
gcloud beta 应用域映射列表
ID SSL_CERTIFICATE_ID SSL_MANAGEMENT_TYPE
host.mydomain.io 5270000 AUTOMATIC
然后我将我的 dns 设置为指向 ghs.googlehosted.com
nslookup host.mydomain.io
Non-authoritative answer:
host.mydomain.io canonical name = ghs.googlehosted.com.
Name: ghs.googlehosted.com
Address: 172.217.0.115
但是我总是得到 404,这里是日志
gcloud app 日志tail -s default
2018-01-25 03:06:32 default[20180124t211951] "GET /" 404
2018-01-25 03:06:36 default[20180124t211951] "GET /" 404
然而,当我使用 https://{project-id}.appspot.com 地址浏览时,它工作正常
2018-01-25 02:31:55 default[20180124t211951] "GET /" 200
app.yaml
entrypoint: 'gunicorn manage:app -w 4 -b :$PORT'
env: flex
runtime: python
env_variables:
FLASK_CONFIG: "production"
【问题讨论】: