新聞發(fā)布
管理系統(tǒng)對于做英文網(wǎng)站的站長來說,使用國外的網(wǎng)站空間建站是合適的,可惜國外好用的免費空間越來越少,剩下的使用上還有諸多限制,那么,做英文網(wǎng)站的站長怎么才能低成本地搭建一個免費靜態(tài)HTML網(wǎng)站呢?答案就是通過Google App Engine來實現(xiàn)
Google App Engine是Google提供的基于Google數(shù)據(jù)中心的開發(fā)、托管網(wǎng)絡應用程序的平臺,每個 Google App Engine 應用程序都可使用1GB存儲空間和每天1G的流量,GAE對于使用資源有各種限制,跑動態(tài)網(wǎng)站往往會配置不夠用,但如果網(wǎng)站使用純粹的靜態(tài)HTML建立,那么這種網(wǎng)站還是可以支持較大的訪問量
使用GAE建立靜態(tài)網(wǎng)站的方法很簡單,先配置好GAE的環(huán)境,然后將靜態(tài)網(wǎng)站內容都復制到應用目錄下,然后編輯app.yaml即可
建議根目錄下少放html文件,次級目錄也不要太多 以下是我建立的一個app.yaml示例文件 在這個例子里,應用名稱為myapp,應用目錄是myapp目錄,靜態(tài)文件分別放在html、css、images三個目錄下,根目錄則是index.html、sitemap.html、about.html三個文件,靜態(tài)文件的目錄里可以繼續(xù)建立子目錄
之后,使用 appcfg.py update myapp 即可將整個靜態(tài)網(wǎng)站上傳到GAE,之后,在GAE的Application Settings - Domain Setup里面添加站長的個人域名即可,添加前需要先用該域名 冊一個Google Apps進行域名身份驗證, 冊驗證完之后即可將Google Apps刪除
- application: myapp
- version: 1
- runtime: python27
- threadsafe: true
- api_version: 1
- handlers:
- - url: /html
- static_dir: html
- - url: /css
- static_dir: css
- - url: /images
- static_dir: images
- - url: /sitemap/.html
- static_files : sitemap.html
- upload: sitemap.html
- - url: /about/.html
- static_files : about.html
- upload: about.html
- - url: /.*
- static_files : index.html
- upload: index.html
相關網(wǎng)站建設技巧閱讀請移步到建站教程頻道