Apache‎ > ‎


Apache http basic authentication

to protect www.site.come/acquisitions/viewLead/viewLead/ put the following in the virtual host portion of the config of the site

<Location /acquisitions/viewLead/viewLead/> Deny from all AuthType Basic AuthUserFile /etc/httpd/viewLead.passwd AuthName Survey require valid-user satisfy any </Location>

htaccess file:

Content of .htaccess file

AuthUserFile /path/to/.htpasswd AuthName "Secure Section" AuthType Basic require valid-user

to create a new password file

htpasswd -c .htpasswd user

htaccess with digest (encryption)

AuthType Digest
AuthName "secure"
AuthUserFile /etc/apache2/htpasswd/secure
AuthDigestDomain /secure/ https://hal.compute.info/secure/
Require valid-user
<Files *.html>
ForceType application/x-httpd-php

to create a new password file:
htdigest -c /etc/apache2/htpasswd/secure user