3 ms·
Nginx config gets pretty hairy as soon as you try and do anything unforseen. Just read http://wiki.nginx.org/IfIsEvil http://wiki.nginx.org/IfIsEvil for a star
by benjiweber 15y ago
Nginx config gets pretty hairy as soon as you try and do anything unforseen.
Just read http://wiki.nginx.org/IfIsEvil http://wiki.nginx.org/IfIsEvil for a start. Lots of things can only be done with ifs (unless you write a custom module) The "What to do instead" doesn't work for things that aren't simple rewrite rules.
There are seemingly arbitrary rules for what contexts you can have conditionals in, what commands can be in conditionals. There is no support for ands, ors, or nested ifs.
- justincormack 15y agoDon't use if. Use the Lua module if you need to do complex stuff, or another one.