Literal dollar signs in values

roy-orbison at roy-orbison at
Wed Apr 21 02:17:10 UTC 2021


I can't find an existing bug on this, and don't have a recent version 
handy to test on, so I'm asking here first: Is it still impossible to 
insert a literal dollar symbol in a config value?

I was debugging nested location config with a statement like so:

return 200 'loc /foo/bar/ \.xyz$ $uri';

This caused an "[emerg] invalid variable name" error when testing the 
config. Apparently a known issue that's documented at 
but the workaround is very hacky.

If this is not resolved already, could this be done in a 
backwards-compatible manner by nginx interpreting "$$" as a literal "$"?


More information about the nginx-devel mailing list