Hosting a static site on Google App Engine
I host a static landing page, www.iandexter.net, on Amazon S3. I also have another static site, my resume (resume.iandexter.net), but this time, it is hosted on Google App Engine (GAE).
Setting up a static site on GAE is a bit more involved than AWS S3. Still, it's fairly straightforward:
In my case, I set up the custom domain through Google Apps for Domains, pointing a DNS alias to
Setting up a static site on GAE is a bit more involved than AWS S3. Still, it's fairly straightforward:
- Sign up for a GAE account.
- Download the latest SDK.
- Create a configuration file,
app.yaml, similar to below:
application: app-name version: 1 runtime: python api_version: 1 default_expiration: "30d" handlers: - url: / static_files: static/index.html upload: static/index.html - url: / static_dir: static - url: /.* static_files: static/404.html upload: static/404.html
(It's a good idea to set up a 404 page similar to an ApacheErrorDocument.) - Set up the directory where the static files will be located:
./app.yaml ./static ./static/index.html ./static/favicon.ico ./static/robots.txt ./static/404.html
- Test the site:
/path/to/gae/sdk/dev_appserver.py app-name/
viewable inhttp://localhost:8080. - Once you're satisfied, deploy the static site:
/path/to/gae/sdk/appcfg.py app-name/
The site is located athttp://app-name.appspot.com.
In my case, I set up the custom domain through Google Apps for Domains, pointing a DNS alias to
ghs.google.com.
Comments
Post a Comment