Valid characters in nginx configuration

Aleksandar Lazic al-nginx at
Fri Mar 17 12:53:40 UTC 2017


Am 15-03-2017 18:00, schrieb SW at EU via nginx:

> Hi,
> there can I find the description of the nginx configuration file syntax 
> e.g. in a BNF like notation. There is defined which characters are 
> allowed in "name" e.g. of an upstream definition? Only ASCII or UTF8, 
> only alpha or alphanumeric and if the last, must it start with alpha. 
> Can I use special characters like "@"? IMO is this the basic 
> information which should be on top of the documentation but either is 
> does not exists or is very good stashed ;-)
> I'm not the first which ask this in the web: 
> but there is no answer and it is from 10 years ago :-(
> Can anyone help me please? Maybe I use wrong search terms.

The name in upstream source is defined as ngx_str_t and ngx_str_t is 
defined here as u_char.

You can try different charakters and see if it works.


More information about the nginx mailing list