Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> I'm working on a large app at the moment where all hostnames are the same regardless of environment, and the only way to switch envs is via a proxy. It's a massive pain.

One of our projects works like this, it sucks.

For per-host app location, we set X-HTTP-Script-Name in the nginx location block and extracted it in WSGI middleware like http://flask.pocoo.org/snippets/35/

Everything else is hardcoded to use 'http://localhost/service_name/foo & nginx proxies to the appropriate resource. Obviously, this doesn't work for non-HTTP services!



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: