diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98OpenSondage b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98OpenSondage
index 52808b3..9680d20 100644
--- a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98OpenSondage
+++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98OpenSondage
@@ -1,10 +1,31 @@
{
my $access = $opensondage{'access'} || 'private';
my $allow = ($access eq 'public')?'all':"$localAccess $externalSSLAccess";
-
+my $auth = $opensondage{'Authentication'}' || 'http';
my $alias = (($opensondage{'AliasOnPrimary'} || 'enabled') eq 'enabled') ?
'Alias /opensondage /usr/share/opensondage' : '';
-
+my $authuser = '';
+my $authadmin = '';
+if ($auth eq 'http'){
+ $authuser =<<'EOF';
+
+ SSLRequireSSL on
+ AuthName "OpenSondage"
+ AuthType Basic
+ AuthExternal pwauth
+ Require valid-user
+
+EOF
+ $authadmin =<<'EOF';
+
+ SSLRequireSSL on
+ AuthName "OpenSondage Admin"
+ AuthType Basic
+ AuthExternal pwauth
+ Require user admin
+
+EOF
+}
if ($opensondage{'status'} eq 'enabled'){
$OUT .=<<"END"
@@ -27,7 +48,9 @@ $alias
Deny from all
+$authuser
+$authadmin
Deny from all