Apache access control the Agaric way
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
More like this
- Repairing a corrupted table, aftermath of Apache using up server resources and taking down MySQL
- Setting up the Agaric way (svn working copy checkouts) on a new server
- Set up Apache, PHP, MySQL for Webserving Drupal
- An individual site Apache virtualhost definition that works for us
- Git the Agaric Way: using shell scripts to add and update projects


Comments
Post new comment