How to properly block the administrator page in Joomla using Nginx proxy?
The problem with proxy_intercept_errors for the /administrator may probably occur because Nginx does not intercept errors for proxied requests unless they are returned from the backend server. In the case of deny all, Nginx generates the 403 error itself, rather than receiving it from the backend, which may prevent this error from being intercepted via proxy_intercept_errors.
Try explicitly specifying an error page for this case in the /administrator block. Also, can you show the contents of the config /usr/share/nginx/html/nginx-errors-ptbr/nginx-errors.conf?
Judging by the port 8080, you are using Apache for the backend. If so, you can also configure blocking using the .htaccess file.
For .htaccess, this rule will be rewritten as follows:
Require ip 192.168.0.0/24
Require ip 192.168.1.0/24
Require all denied
Read more here: Source link