Within the question Dealing with subdomain in the search engines application engine, the next code was recommended.
programs = def primary(): run_wsgi_application(programs[os.environ['HTTP_HOST']]) if __title__ == '__primary__': primary()
My real question is how do you test this in your area? When I am testing it in your area, the host is "localhost:8080" and never the domain names.
Create two new records inside your Hosts file:
127...1 product.example.com 127...1 user.example.com
and run the local GAE application on default Http port 80.
If, for whatever reason, you cannot run GAE on port 80, you could attempt to change your
application.py to complement the neighborhood port number with something similar to this:
if os.environ['SERVER_SOFTWARE'].startswith('Dev'): PORT=':8080' else: PORT='' programs =
As well as modifying the primary function such as this (Because of @Nick's comment):
def primary(): run_wsgi_application(programs[os.environ['HTTP_HOST'].split(':')])
Make sure to switch back your
Hosts file to have the ability to achieve the development server.