nginx failed to start ("set" directive is not allowed here)

Linode Staff

I'm seeing the following message in my boot logs:

Starting nginx… nginx: [emerg] "set" directive is not allowed here in /usr/local/nginx/conf/example.conf:17


1 Reply

I would need to see how this is actually configured but it looks like the "set" directive can only be used in the server, location, and if blocks:

ngx http rewrite module


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct