Apache access control the Agaric way
[Note, this is outdated, now using Kerberos.]
Clients don't like their test site competing with their live, production site for Google results. Therefore, we have put our entire set of test sites behind a pop-up requiring basic Apache authentication.
For ongoing maintenance — adding new people to access the test environment behind the authorization wall — the operative command is:
sudo htpasswd /etc/apache2/passwd/passwords sam
Where sam is replaced with whatever username you want the next user added to have.
The setup instructions follow below.
Resolution
Roughly following the instructions here:
http://httpd.apache.org/docs/2.2/howto/auth.html
sudo mkdir /etc/apache2/passwd
sudo htpasswd -c /etc/apache2/passwd/passwords dan
New password:
Re-type new password:
Adding password for user dan
sudo htpasswd /etc/apache2/passwd/passwords benjamin
New password:
Re-type new password:
Adding password for user benjamin
sudo vi /etc/apache2/httpd.conf
<Directory /sites>
AuthType Basic
AuthName "Agaric Test Server"
AuthBasicProvider file
AuthUserFile /etc/apache2/passwd/passwords
Require valid-user
</Directory>
sudo /etc/init.d/apache2 reload
You may also find your configuration files in the sites-enabled directory (symlinked from sites-available).
That works for all subdirectories of /sites thankfully
Comments
Post new comment