I'm trying to protect DOMAIN.com/admin, the folder admin doesn't exist its just a route
I have a Codeigniter Controller called Admin.php
and the route for it as follows:
routes.php
$route['admin'] = 'index_admin';
I'm trying to do Basic Auth, with Nginx
location /admin {
auth_basic "Administrator’s Area";
auth_basic_user_file /etc/nginx/.htpasswd;
}
The authentication box is working, however I get 404 error after that.