I am trying to follow this example here- https://gist.github.com/morhekil/1ff0e902ed4de2adcb7a#file-nginx-conf but getting error- "set" directive is not allowed here
what am I doing wrong? Note that I am using openresty and invoking nginx as-
nginx -p `pwd`/ -c conf/nginx.conf
The context of my nginx.conf matches exactly as https://gist.github.com/morhekil/1ff0e902ed4de2adcb7a#file-nginx-conf
If I move the set variable to server section, I no longer get that error but a new error-
nginx: [emerg] unknown "resp_body" variable
After months, an answer is coming :)
Github configuration file seems wrong. set
directive is used in server
, location
and if
blocks.
Syntax: set $variable value;
Default: —
Context: server, location, if
http://nginx.org/en/docs/http/ngx_http_rewrite_module.html#set
Good luck!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With