|
|
@ -8,11 +8,11 @@ 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 = ($alias ne 'enabled') ? '' : 'Alias /phplist /usr/share/phplist/www/'; |
|
|
|
$alias = ($alias ne 'enabled') ? '' : 'Alias /lists /usr/share/phplist/www/'; |
|
|
|
$auth = ( $auth eq 'http' ) ? '' : 'AuthName "phplist"' . "\n" . |
|
|
|
$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" : ''; |
|
|
|
|
|
|
|
|
|
|
|
if ($status eq 'enabled') { |
|
|
|
if ($status eq 'enabled') { |
|
|
|
$OUT .=<<"EOF"; |
|
|
|
$OUT .=<<"EOF"; |
|
|
@ -22,33 +22,31 @@ $alias |
|
|
|
<Directory /usr/share/phplist/www/> |
|
|
|
<Directory /usr/share/phplist/www/> |
|
|
|
Options None |
|
|
|
Options None |
|
|
|
AllowOverride None |
|
|
|
AllowOverride None |
|
|
|
|
|
|
|
DirectoryIndex index.php |
|
|
|
AddType application/x-httpd-php .php .php3 |
|
|
|
AddType application/x-httpd-php .php .php3 |
|
|
|
php_admin_value openbase_dir /usr/share/phplist:/var/lib/phplist:/tmp:/etc/phplist |
|
|
|
php_admin_value openbase_dir /usr/share/phplist:/var/lib/phplist:/tmp:/etc/phplist |
|
|
|
php_admin_flag file_uploads on |
|
|
|
php_admin_flag file_uploads on |
|
|
|
php_admin_value upload_max_filesize 5M |
|
|
|
php_admin_value upload_max_filesize 5M |
|
|
|
php_admin_value post_max_size 6M |
|
|
|
php_admin_value post_max_size 6M |
|
|
|
php_admin_value memory_limit 128M |
|
|
|
php_admin_value memory_limit 128M |
|
|
|
<FilesMatch "\.(php|inc)\$"> |
|
|
|
php_admin_value session.save_path /var/lib/phplist/tmp |
|
|
|
|
|
|
|
php_admin_value upload_tmp_dir /var/lib/phplist/tmp |
|
|
|
|
|
|
|
<FilesMatch "\\.inc\$"> |
|
|
|
Order allow,deny |
|
|
|
Order allow,deny |
|
|
|
deny from all |
|
|
|
deny from all |
|
|
|
</FilesMatch> |
|
|
|
</FilesMatch> |
|
|
|
<FilesMatch "(index.php|dl.php|ut.php|lt.php|download.php|connector.php)\$"> |
|
|
|
Order deny,allow |
|
|
|
Order allow,deny |
|
|
|
deny from all |
|
|
|
allow from $allow |
|
|
|
allow from $allow |
|
|
|
</FilesMatch> |
|
|
|
|
|
|
|
</Directory> |
|
|
|
</Directory> |
|
|
|
|
|
|
|
|
|
|
|
# Admin section |
|
|
|
# Admin section |
|
|
|
<Directory /usr/share/phplist/www/admin> |
|
|
|
<Directory /usr/share/phplist/www/admin> |
|
|
|
SSLRequireSSL on |
|
|
|
SSLRequireSSL on |
|
|
|
<FilesMatch "\.(php|inc)\$"> |
|
|
|
<FilesMatch "\\.inc\$"> |
|
|
|
Order allow,deny |
|
|
|
Order allow,deny |
|
|
|
Deny from all |
|
|
|
Deny from all |
|
|
|
</FilesMatch> |
|
|
|
</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 |
|
|
|