Here is my code:
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
server {
listen 80;
listen [::]:80;
root /home/ubuntu/iot-web/;
index index.html index.htm index.nginx-debian.html;
server_name domain.net www.domain.net;
location /api/ {
proxy_pass http://localhost:8080/api/;
}
location /auth/login {
root /home/ubuntu/iot-web/;
index index.html index.htm index.nginx-debian.html;
}
location / {
try_files $uri $uri/ =404;
}
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
After access to domain.net, user re-direct to domain.net/auth/login and then login to dashboard.
But if the user access directly to 'domain.net/auth/login' it getting "404 Not Found", Why is that? how to fix it ?