diff --git a/Dockerfile b/Dockerfile index 1241143..c0bde08 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,11 @@ RUN apk add rsync nginx zlib-dev libpng-dev freetype-dev libjpeg-turbo-dev \ && docker-php-ext-configure gd --with-freetype --with-jpeg \ && docker-php-ext-install -j$(nproc) gd \ && cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini \ - && mkdir -p /var/www/downloads && cd /var/www/downloads/ \ + && cd /usr/local/etc/php/ \ + && sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 20M/g' php.ini \ + && sed -i 's/post_max_size = 8M/post_max_size = 20M/g' php.ini \ + && mkdir -p /var/www/downloads \ + && cd /var/www/downloads/ \ && wget "https://git.filesite.io/filesite/machete/archive/master.tar.gz" \ && tar -zxvf master.tar.gz \ && rm -f master.tar.gz \ diff --git a/Dockerfile_samba b/Dockerfile_samba index f9c1cbb..de992a3 100644 --- a/Dockerfile_samba +++ b/Dockerfile_samba @@ -8,7 +8,8 @@ RUN yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.n && yum -y install php82-php-fpm php82-php-gd php82-php-mbstring nginx wget rsync samba \ && ln -s /opt/remi/php82/root/usr/sbin/php-fpm /usr/sbin/php-fpm \ && cd /etc/opt/remi/php82/ \ - && sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 10M/g' php.ini \ + && sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 20M/g' php.ini \ + && sed -i 's/post_max_size = 8M/post_max_size = 20M/g' php.ini \ && mkdir -p /var/www/downloads && cd /var/www/downloads/ \ && wget "https://git.filesite.io/filesite/machete/archive/master.tar.gz" \ && tar -zxvf master.tar.gz \ diff --git a/bin/install.sh b/bin/install.sh index 66e693c..5122a47 100755 --- a/bin/install.sh +++ b/bin/install.sh @@ -20,7 +20,8 @@ rpm -ql php82-php-fpm-8.2.0~rc5-18.el7.remi ## replace configs in php.ini cd /etc/opt/remi/php82/ -sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 10M/g' php.ini +sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 20M/g' php.ini +sed -i 's/post_max_size = 8M/post_max_size = 20M/g' php.ini ## zh_CN support yum -y install kde-l10n-Chinese diff --git a/conf/nginx.conf b/conf/nginx.conf index e0f1f66..005fd99 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -23,7 +23,7 @@ http { keepalive_timeout 65; types_hash_max_size 4096; - client_max_body_size 10m; + client_max_body_size 20m; include /etc/nginx/mime.types; default_type application/octet-stream; diff --git a/conf/nginx_machete.conf b/conf/nginx_machete.conf index a7e1916..e383620 100644 --- a/conf/nginx_machete.conf +++ b/conf/nginx_machete.conf @@ -6,7 +6,7 @@ server { #charset UTF-8; #access_log logs/machete.access.log main; - client_max_body_size 10m; + client_max_body_size 20m; root /var/www/machete/www; index index.php index.html;