First, check if your apache2 has the utils package
sudo apt-get install apache2-utils
Then, set the username and password.
sudo htpasswd -c /etc/apache2/.htpasswd <username>
After that, edit your reverse proxy to use the authentication
<VirtualHost *:80>
    ProxyPreserveHost On
    ProxyPass / http://someaddress:1234/
    ProxyPassReverse / http://someaddress:1234/
    Timeout 5400
    ProxyTimeout 5400
    ServerName dev.mydomain.com
    ServerAlias *.dev.mydomain.com
    <Proxy *>
        Order deny,allow
        Allow from all
        Authtype Basic
        Authname "Password Required"
        AuthUserFile /etc/apache2/.htpasswd
        Require valid-user
    </Proxy>
</virtualhost>
At least, update your apache
sudo service apache2 reload