Resolvido usando o nginx.
location /folder/ {
proxy_pass http://localhost:8080/folder/;
satisfy any;
allow 192.168.0.0/24;
deny all;
auth_basic "pw";
auth_basic_user_file /var/www/folder/.htpasswd;
include /etc/nginx/proxy_params;
}