I'm using nginx mostly as a reverse cachining proxy in front of several gunicon/mod_wsgi applications and of course to server static files. I find that quickly my nginx confs become impossible to maintain; the issue is that I have a few patterns that are similar (or even identical) but I can't manage to make it clean. One of the biggest issues I have is that I would love to use named locations as
![How to write a DRY, modular nginx conf (reverse proxy) with named locations](https://cdn-ak-scissors.b.st-hatena.com/image/square/1d7824625a3ecbc3a39062b14aaa9db8a44aa022/height=288;version=1;width=512/https%3A%2F%2Fcdn.sstatic.net%2FSites%2Fserverfault%2FImg%2Fapple-touch-icon%402.png%3Fv%3D9b1f48ae296b)