What does this do:
location /app1 {
rewrite /app1/([^/]+) /$1 break;
proxy_pass https://192.168.1.2:8080/;
}
location /app1 {
rewrite /app1/([^/]+) /$1 break;
proxy_pass https://192.168.1.2:8080/;
}