83 lines
2.6 KiB
Plaintext
83 lines
2.6 KiB
Plaintext
{
|
|
|
|
use esmith::AccountsDB;
|
|
|
|
if (($ajaxplorer{'status'} || 'disabled') eq 'enabled'){
|
|
my $alias = (($ajaxplorer{'AliasOnPrimary'} || 'enabled') eq 'enabled' ) ? 'Alias /ajaxplorer /usr/share/ajaxplorer':'';
|
|
my $allow = (($ajaxplorer{'access'} || 'private') eq 'public') ? 'all':"$localAccess $externalSSLAccess";
|
|
my $auth = (($ajaxplorer{'Authentication'} || 'http') eq 'http') ? "AuthName \"Ajaxplorer\"\n" .
|
|
" AuthType Basic\n" .
|
|
" AuthExternal pwauth\n" .
|
|
" Require valid-user\n" : '';
|
|
my $maxsize = $ajaxplorer{'MaxUploadSize'} || '200M';
|
|
my $homedir = $ajaxplorer{'HomeDir'} || 'none';
|
|
$homedir = (($homedir eq 'enabled') || ($homedir eq 'users')) ? ":/home/e-smith/files/users":"";
|
|
|
|
my $shares = '';
|
|
|
|
my $public = $ajaxplorer{'PublicShares'} || 'enabled';
|
|
$OUT .=<<"EOF" if ($public eq 'enabled');
|
|
|
|
Alias /ajxppub /var/lib/ajaxplorer/public
|
|
<Directory /var/lib/ajaxplorer/public>
|
|
Options None
|
|
AddType application/x-httpd-php .php
|
|
php_admin_value open_basedir /usr/share/ajaxplorer:/var/lib/ajaxplorer:/var/log/ajaxplorer:/etc/ajaxplorer:/var/cache/ajaxplorer:/usr/share/pear/:/home/e-smith/files/shares$homedir
|
|
Order deny,allow
|
|
Allow from all
|
|
<Files ".ajxp_*">
|
|
deny from all
|
|
</Files>
|
|
<IfModule mod_xsendfile.c>
|
|
XSendFile on
|
|
XSendFilePath /home/e-smith/files/shares
|
|
XSendFilePath /var/lib/ajaxplorer
|
|
XSendFilePath /home/e-smith/files/users
|
|
</IfModule>
|
|
</Directory>
|
|
|
|
EOF
|
|
|
|
$OUT .=<<"EOF";
|
|
|
|
$alias
|
|
|
|
<Directory /usr/share/ajaxplorer>
|
|
AddType application/x-httpd-php .php
|
|
php_admin_value open_basedir /usr/share/ajaxplorer:/var/lib/ajaxplorer:/var/log/ajaxplorer:/etc/ajaxplorer:/var/cache/ajaxplorer:/usr/share/pear/:/home/e-smith/files/shares$homedir
|
|
php_admin_value memory_limit 100M
|
|
php_admin_value upload_max_filesize $maxsize
|
|
php_admin_value post_max_size $maxsize
|
|
php_admin_value max_execution_time 900
|
|
php_admin_value upload_tmp_dir /var/lib/ajaxplorer/tmp
|
|
php_admin_value session.save_path /var/lib/ajaxplorer/tmp
|
|
php_admin_value output_buffering off
|
|
SSLRequireSSL on
|
|
Order deny,allow
|
|
Deny from all
|
|
Allow from $allow
|
|
$auth
|
|
<IfModule mod_xsendfile.c>
|
|
XSendFile on
|
|
XSendFilePath /home/e-smith/files/shares
|
|
XSendFilePath /var/lib/ajaxplorer
|
|
XSendFilePath /home/e-smith/files/users
|
|
</IfModule>
|
|
</Directory>
|
|
|
|
EOF
|
|
|
|
}
|
|
else {
|
|
$OUT .=<<'EOF';
|
|
|
|
# Ajaxplorer is disabled
|
|
# You can enable it with
|
|
# db configuration setprop ajaxplorer status enabled
|
|
# signal-event webapps-update
|
|
|
|
EOF
|
|
}
|
|
|
|
}
|