You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# grep -E '^\s*include\s+' /etc/nginx/nginx.conf
include mime.types;
include /etc/nginx/conf.d/*.conf;
# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
# echo $?
0
As you can see, the types directive as a block is perfectly valid and a block is expected per the example in Nginx documentation.
The obvious reason is that type is not noted as a block directive (neither in block_re nor block_re_all). However, unlike other block_re_all, it only has the form of <directive> <block>, there are no args.
I tried fiddling with the lens a bit but wasn't able to get it to properly pull in the block itself.
The text was updated successfully, but these errors were encountered:
Place the following as
/etc/nginx/conf.d/test.conf
:Ensure it is parsed by Nginx:
As you can see, the
types
directive as a block is perfectly valid and a block is expected per the example in Nginx documentation.Now try to load it.
The obvious reason is that
type
is not noted as a block directive (neither inblock_re
norblock_re_all
). However, unlike otherblock_re_all
, it only has the form of<directive> <block>
, there are no args.I tried fiddling with the lens a bit but wasn't able to get it to properly pull in the block itself.
The text was updated successfully, but these errors were encountered: