|
|
@ -1,12 +1,12 @@ |
|
|
|
{ |
|
|
|
{ |
|
|
|
my $access = $limesurvey{'access'} || 'private'; |
|
|
|
my $access = $limesurvey{'access'} || 'private'; |
|
|
|
my $allow = ($access eq 'public') ? 'all' : "$localAccess $externalSSLAccess"; |
|
|
|
my $allow = ($access eq 'public') ? 'all' : "$localAccess $externalSSLAccess"; |
|
|
|
|
|
|
|
|
|
|
|
my $alias = (($limesurvey{'AliasOnPrimary'} || 'enabled') ne 'enabled') ? |
|
|
|
my $alias = (($limesurvey{'AliasOnPrimary'} || 'enabled') ne 'enabled') ? |
|
|
|
'' : 'Alias /limesurvey /usr/share/limesurvey'; |
|
|
|
'' : 'Alias /limesurvey /usr/share/limesurvey'; |
|
|
|
|
|
|
|
my $ver = $sysconfig{'ReleaseVersion'} || '8.1'; |
|
|
|
my $auth = (($limesurvey{'Authentication'} || 'http') eq 'http') ? "AuthName \"LimeSurvey\"\n" . |
|
|
|
my $auth = (($limesurvey{'Authentication'} || 'http') eq 'http') ? "AuthName \"LimeSurvey\"\n" . |
|
|
|
" AuthType Basic\n" . |
|
|
|
" AuthType Basic\n" . |
|
|
|
" AuthExternal pwauth\n" . |
|
|
|
" AuthExternal pwauth\n" . (($ver =~ m/^9/) ? " AuthBasicProvider external\n":'') . |
|
|
|
" Require valid-user\n" : ''; |
|
|
|
" Require valid-user\n" : ''; |
|
|
|
|
|
|
|
|
|
|
|
if ($limesurvey{'status'} eq 'enabled'){ |
|
|
|
if ($limesurvey{'status'} eq 'enabled'){ |
|
|
@ -37,10 +37,10 @@ $alias |
|
|
|
allow from $allow |
|
|
|
allow from $allow |
|
|
|
Satisfy all |
|
|
|
Satisfy all |
|
|
|
</Directory> |
|
|
|
</Directory> |
|
|
|
<Directory /usr/share/limesurvey/admin> |
|
|
|
<LocationMatch "^/{ ($alias eq '') ? '' : 'limesurvey/' }(index\.php/)?admin"> |
|
|
|
SSLRequireSSL on |
|
|
|
SSLRequireSSL on |
|
|
|
$auth |
|
|
|
$auth |
|
|
|
</Directory> |
|
|
|
</LocationMatch> |
|
|
|
<DirectoryMatch "/usr/share/limesurvey/(framework|console|installer/sql|locale|application/(logs|config)|docs)"> |
|
|
|
<DirectoryMatch "/usr/share/limesurvey/(framework|console|installer/sql|locale|application/(logs|config)|docs)"> |
|
|
|
Deny from all |
|
|
|
Deny from all |
|
|
|
</DirectoryMatch> |
|
|
|
</DirectoryMatch> |
|
|
|