"set" directive is not allowed here

user375868

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
efkan

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!

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

nginx "env" directive is not allowed here

From Dev

NGINX - "server" directive is not allowed here

From Java

nginx: [emerg] "server" directive is not allowed here

From Dev

nginx directive is not allowed here in unicorn's example nginx.conf

From Dev

Can't Start Nginx: "server" directive is not allowed here

From Dev

nginx: [emerg] "location" directive is not allowed here in /etc/nginx/conf.d/default.conf:1

From Dev

nginx: [emerg] "worker_processes" directive is not allowed here in /opt/tools/nginx/conf/nginx.conf:1

From Dev

"AllowOverride not allowed here" in WAMP

From Dev

AllowOverride not allowed here

From Dev

.htaccess: LogLevel not allowed here

From Dev

variable declaration not allowed here

From Dev

Array initializer is not allowed here

From Dev

Column not allowed here error

From Dev

"AllowOverride not allowed here" in WAMP

From Dev

variable declaration not allowed here

From Dev

Is this preprocessor directive acceptable here?

From Dev

Error: 'void' type not allowed here

From Dev

Apache error "AliasMatch not allowed here"

From Dev

cdef statement not allowed here for structure

From Dev

Why is variable declaration not allowed here?

From Dev

Android manifest attribute not allowed here

From Dev

Error: Parse Objects not allowed here

From Dev

Why is lambda function not allowed here?

From Dev

About "group function is not allowed here"

From Dev

Apache error "AliasMatch not allowed here"

From Dev

column not allowed here oracle with getText

From Dev

Error: 'void' type not allowed here

From Dev

@FindBy Annotations not allowed here for CSS

From Dev

Android Lint Shape not allowed here

Related Related

HotTag

Archive