Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to host static HTML files on Google App Engine?

Is it possible to host a static HTML website on App Engine? And how to make my domain name work with it?

like image 645
zotherstupidguy Avatar asked May 04 '09 08:05

zotherstupidguy


People also ask

How do I deploy a static website in Google Drive?

To host a web page on Google Drive: Create a folder in Google Drive and set the sharing permission to “Public on the Web.” Upload the HTML, JavaScript and CSS files for your web page to the new folder. Select the HTML file, open it and click the “Preview” button in the toolbar.


2 Answers

Yes you can host your static files on AppEngine. Just configure your app.yaml-file like the following

- url: /   static_dir: static_files 

And put your files in the directory static_files. This way every request is routed to your static files.

like image 189
B.E. Avatar answered Oct 11 '22 23:10

B.E.


I just had the same problem and decided to use this solution... It serves static files from the root directory and uses index.html if you don't give an file. Hope that helps.

# re-direct to index.html if no path is give - url: /   static_files: index.html   upload: index.html  # access the static resources in the root director  - url: /(.*)   static_files: \1   upload: (.*) 
like image 23
Brad Abrams Avatar answered Oct 12 '22 00:10

Brad Abrams