In order to allow range of IPs in NGINX, I add this row to my nginx configuration, in server declarative:
allow 165.165.165.0/255;
deny all;
When I test this modification (by sudo nginx -c /etc/nginx/nginx.conf -t) I got this error:
nginx: [emerg] invalid parameter "165.165.165.0/255" in
/etc/nginx/default.d/server.conf:1
What wrong?
Thanks
>Solution :
The error in your NGINX configuration is due to an incorrect IP range format. Use CIDR notation instead:
Replace allow 165.165.165.0/255; with allow 165.165.165.0/24;.
You can test the configuration again with sudo nginx -t and reload NGINX if successful.