Protect Apache with Basic Auth on Ubuntu
HTTP Basic authentication can place a small, auditable username/password gate in front of an Apache directory. Use it only over HTTPS, keep the password file outside the document root, validate configuration before reload, and test both unauthorized and authorized paths without exposing credentials.