简体   繁体   中英

Local domain and sub domain mapping (web development)

Under Linux what are the options for implementing a domain and subdomain mapping for a Google App Engine web application during development mode.

  • Is there like a on-the-fly domain mapping where I don't have to deal with modifying Linux network properties manually?

I have a GAE where the I need to make this subdomain mapping based on some hash or username like:

http://username.myapp.com (Local)

Where it is also accessible through http://myapp.com/username

Right now I can access such resource through: http://127.0.0.1:8888/somename

However, right now I really need to test it with such mapping.

You should be able to test it locally by defining the subdomains in your hosts file, /etc/hosts (unix/linux) or c:\\windows\\system32\\drivers\\etc\\hosts . So, for example, you could define there

127.0.0.1 myapp.com subdomain1.myapp.com subdomain2.myapp.com

And then going on your browser to either of these domain names will go to 127.0.0.1.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM