Reputation: 19
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 i.e those are not populated by app.yaml automatically it works File structure is as
css
images
js
index.html
..
and yaml file is as :
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
Upvotes: 0
Views: 109
Reputation: 12033
A typical app.yaml that just does static content would be arranged like this: put the static content in a subdirectory, say "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:
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). Then that's a matter of adding an earlier entry that maps to that index.php file:
application: shimlachadwick
version: 1
runtime: php
api_version: 1
handlers:
- url: /$
script: index.php
- url: /
static_dir: htdocs
Upvotes: 1