From 297080320c81236155692f48f55f907987137f0a Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 19 Nov 2013 15:55:17 +0100 Subject: [PATCH] Read the upload limit from a DB prop --- root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98Dl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98Dl b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98Dl index dd41194..28dfe78 100644 --- a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98Dl +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/98Dl @@ -4,6 +4,10 @@ my $allow = ($access eq 'public')?'all':"$localAccess $externalSSLAccess"; my $authtype = $dl{'Authentication'} || 'http'; my $alias = (($dl{'AliasOnPrimary'} || 'enabled') eq 'enabled') ? 'Alias /dl /usr/share/dl' : ''; +my $maxupload = $dl{'MaxUploadSize'} || '1024'; +my $maxpost = $maxupload+1; +$maxupload .= 'M'; +$maxpost .= 'M'; my $auth = ''; if ($authtype eq 'http'){ $auth =<<'EOF'; @@ -30,8 +34,8 @@ $alias php_admin_flag file_uploads On php_admin_flag magic_quotes Off php_admin_flag magic_quotes_gpc Off - php_admin_value upload_max_filesize 1024M - php_admin_value post_max_size 1025M + php_admin_value upload_max_filesize $maxupload + php_admin_value post_max_size $maxpost php_admin_value memory_limit 100M php_admin_flag output_buffering Off php_admin_value max_execution_time 0