You can use rewrite instead of deny all
location /admin/ { uwsgi_pass myupstream1; include /path/to/uwsgi_params;
Put 404.php in the root of your domain (for example, _http: //127.0.0.1/404.php) or change "path / to / file / 404.php? Id = $ 1"
Jonny
source share