Add ACL settings in /etc/nginx/templates/roundcubemail.conf (and other *.conf if necessary).
http://nginx.org/en/docs/http/ngx_http_ … html#allow
https://www.nginx.com/resources/admin-g … ng-access/
Thanks! I only found *.tmpl files in the location you specified. I tried editing the roundcube.tmpl file and added the following to the top of that file (example IP used below):
location / {
allow 192.168.1.1;
deny all;
}
I then reload nginx and I get the following error: "nginx: [emerg] duplicate location "/" in /etc/nginx/templates/roundcube.tmpl:3"
I tried removing the '/' after the 'location' in the above configuration and it doesn't help.
However, If remove the above code block and just do the following:
allow 192.168.1.1; deny all;
It works but the problem is that the above doesn't apply just for roundcube... and it blocks the access to everything (I can't even get into iredadmin and sogo)
What should be right syntax I should be using in the roundcube.tmpl file to accomplish the above?