【发布时间】:2011-07-23 11:11:30
【问题描述】:
在问题Working with subdomain in google app engine中,建议使用以下代码。
applications = {
'product.example.com': webapp.WSGIApplication([
('/', IndexHandler),
('/(.*)', ProductHandler)]),
'user.example.com': webapp.WSGIApplication([
('/', IndexHandler),
('/(.*)', UserHandler)]),
}
def main():
run_wsgi_app(applications[os.environ['HTTP_HOST']])
if __name__ == '__main__':
main()
我的问题是如何在本地进行测试?当我在本地测试它时,主机是“localhost:8080”而不是任何域。
【问题讨论】:
标签: google-app-engine dns subdomain multiple-domains