Welcome! Log In Create A New Profile

Advanced

Valid characters in nginx configuration

Posted by [email protected] 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: http://stackoverflow.com/questions/36485834/valid-characters-in-nginx-upstream-name, but there is no answer and it is from 10 years ago :-(

Can anyone help me please? Maybe I use wrong search terms.

TIA,
SW

Sent with [ProtonMail](https://protonmail.com) Secure Email._______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Aleksandar Lazic
Re: Valid characters in nginx configuration
March 17, 2017 02:00PM
Hi.

Am 15-03-2017 18:00, schrieb [email protected] 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:
> http://stackoverflow.com/questions/36485834/valid-characters-in-nginx-upstream-name,
> 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
http://hg.nginx.org/nginx/file/tip/src/core/ngx_string.h#l16 as u_char.

You can try different charakters and see if it works.

Cheers
Aleks
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Sorry, only registered users may post in this forum.

Click here to login