As previously mentioned there, the documentation for this (very
important) command is quite hard to understand and was in need of
attention. So, after much re-reading and using Google translate on the
Russian docs, I think I understood it and completely rewrote that
section. I would appreciate it if Igor and the other nginx team
members could review it to make sure it is correct.
This is slower than using the non-regex versions like Igor did but for
me the convenience of a shorter configuration file outweighs the
performance hit of a regex call... besides, the regex was going to be
called anyway unless you use ^~ (see the docs :) ).