|
|
@ -2,14 +2,14 @@ |
|
|
|
|
|
|
|
|
|
|
|
my $status = $phplist{'status'} || 'disabled'; |
|
|
|
my $status = $phplist{'status'} || 'disabled'; |
|
|
|
my $access = $phplist{'access'} || 'private'; |
|
|
|
my $access = $phplist{'access'} || 'private'; |
|
|
|
my $lemonldap = $phplist{'LemonLDAP'} || 'disabled'; |
|
|
|
my $auth = $phplist{'Authentication'} || 'http'; |
|
|
|
my $alias = $phplist{'AliasOnPrimary'} || 'enabled'; |
|
|
|
my $alias = $phplist{'AliasOnPrimary'} || 'enabled'; |
|
|
|
my @users = split(/[;,]/, ($phplist{'AdminUsers'} || 'admin')); |
|
|
|
my @users = split(/[;,]/, ($phplist{'AdminUsers'} || 'admin')); |
|
|
|
my $users = join(' ', @users); |
|
|
|
my $users = join(' ', @users); |
|
|
|
|
|
|
|
|
|
|
|
my $allow = ( $access eq 'public' ) ? 'all' : "$localAccess $externalSSLAccess"; |
|
|
|
my $allow = ( $access eq 'public' ) ? 'all' : "$localAccess $externalSSLAccess"; |
|
|
|
$alias = (( $lemonldap eq 'enabled') || ($alias eq 'disabled')) ? '' : 'Alias /lists /usr/share/phplist/www/lists'; |
|
|
|
$alias = ($alias ne 'enabled') ? '' : 'Alias /lists /usr/share/phplist/www/'; |
|
|
|
my $auth = ( $lemonldap eq 'enabled' ) ? '' : 'AuthName "phplist"' . "\n" . |
|
|
|
my $auth = ( $auth eq 'http' ) ? '' : 'AuthName "phplist"' . "\n" . |
|
|
|
" AuthType Basic\n" . |
|
|
|
" AuthType Basic\n" . |
|
|
|
" AuthExternal pwauth\n" . |
|
|
|
" AuthExternal pwauth\n" . |
|
|
|
" require user $users\n"; |
|
|
|
" require user $users\n"; |
|
|
@ -19,19 +19,36 @@ if ($status eq 'enabled') { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$alias |
|
|
|
$alias |
|
|
|
<Directory /usr/share/phplist/www/lists> |
|
|
|
<Directory /usr/share/phplist/www/> |
|
|
|
Options -Indexes |
|
|
|
Options None |
|
|
|
AllowOverride None |
|
|
|
AllowOverride None |
|
|
|
order deny,allow |
|
|
|
AddType application/x-httpd-php .php .php3 |
|
|
|
|
|
|
|
php_admin_value /usr/share/phplist:/var/lib/phplist:/tmp:/etc/phplist |
|
|
|
|
|
|
|
php_admin_flag file_uploads on |
|
|
|
|
|
|
|
php_admin_value upload_max_filesize 5M |
|
|
|
|
|
|
|
php_admin_value post_max_size 6M |
|
|
|
|
|
|
|
php_admin_value memory_limit 128M |
|
|
|
|
|
|
|
<FilesMatch "\.(php|inc)\$"> |
|
|
|
|
|
|
|
Order allow,deny |
|
|
|
deny from all |
|
|
|
deny from all |
|
|
|
|
|
|
|
</FilesMatch> |
|
|
|
|
|
|
|
<FilesMatch "(index.php|dl.php|ut.php|lt.php|download.php|connector.php)\$"> |
|
|
|
|
|
|
|
Order allow,deny |
|
|
|
allow from $allow |
|
|
|
allow from $allow |
|
|
|
Satisfy all |
|
|
|
</FilesMatch> |
|
|
|
AddType application/x-httpd-php .php .php3 |
|
|
|
|
|
|
|
</Directory> |
|
|
|
</Directory> |
|
|
|
|
|
|
|
|
|
|
|
# Admin section |
|
|
|
# Admin section |
|
|
|
<Directory /usr/share/phplist/www/lists/admin> |
|
|
|
<Directory /usr/share/phplist/www/admin> |
|
|
|
SSLRequireSSL on |
|
|
|
SSLRequireSSL on |
|
|
|
|
|
|
|
<FilesMatch "\.(php|inc)\$"> |
|
|
|
|
|
|
|
Order allow,deny |
|
|
|
|
|
|
|
Deny from all |
|
|
|
|
|
|
|
</FilesMatch> |
|
|
|
|
|
|
|
<FilesMatch "(index.php|connector.php|upload.php)\$"> |
|
|
|
|
|
|
|
Order allow,deny |
|
|
|
|
|
|
|
allow from all |
|
|
|
|
|
|
|
</FilesMatch> |
|
|
|
order deny,allow |
|
|
|
order deny,allow |
|
|
|
deny from all |
|
|
|
deny from all |
|
|
|
allow from $allow |
|
|
|
allow from $allow |
|
|
|