Need help to setup basic HTTP authentication

I've found the easiest way is to use Apache as a reverse proxy, implement basic auth there. That's because I'm more familiar with Apache than anything else (Java, ES plugins etc).