mirror of
https://github.com/nextcloud/docker.git
synced 2025-04-19 18:36:09 +02:00
feat: set apache LimitRequestBody
Signed-off-by: adripo <26493496+adripo@users.noreply.github.com>
This commit is contained in:
parent
12390fb508
commit
b11acf99c8
2 changed files with 9 additions and 1 deletions
|
@ -20,6 +20,7 @@ RUN set -ex; \
|
|||
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
|
||||
ENV PHP_MEMORY_LIMIT 512M
|
||||
ENV PHP_UPLOAD_LIMIT 512M
|
||||
%%VARIANT_EXTRAS_ENV%%
|
||||
RUN set -ex; \
|
||||
\
|
||||
savedAptMark="$(apt-mark showmanual)"; \
|
||||
|
|
|
@ -28,8 +28,14 @@ declare -A base=(
|
|||
[fpm-alpine]='alpine'
|
||||
)
|
||||
|
||||
declare -A extras_env=(
|
||||
[apache]='ENV APACHE_BODY_LIMIT 1073741824'
|
||||
[fpm]=''
|
||||
[fpm-alpine]=''
|
||||
)
|
||||
|
||||
declare -A extras=(
|
||||
[apache]='\nRUN a2enmod headers rewrite remoteip ;\\\n {\\\n echo RemoteIPHeader X-Real-IP ;\\\n echo RemoteIPInternalProxy 10.0.0.0/8 ;\\\n echo RemoteIPInternalProxy 172.16.0.0/12 ;\\\n echo RemoteIPInternalProxy 192.168.0.0/16 ;\\\n } > /etc/apache2/conf-available/remoteip.conf;\\\n a2enconf remoteip'
|
||||
[apache]='\nRUN a2enmod headers rewrite remoteip ; \\\n { \\\n echo '\''RemoteIPHeader X-Real-IP'\''; \\\n echo '\''RemoteIPInternalProxy 10.0.0.0/8'\''; \\\n echo '\''RemoteIPInternalProxy 172.16.0.0/12'\''; \\\n echo '\''RemoteIPInternalProxy 192.168.0.0/16'\''; \\\n } > /etc/apache2/conf-available/remoteip.conf; \\\n a2enconf remoteip\n\n# set apache config LimitRequestBody\nRUN { \\\n echo '\''LimitRequestBody ${APACHE_BODY_LIMIT}'\''; \\\n } > /etc/apache2/conf-available/apache-limits.conf; \\\n a2enconf apache-limits'
|
||||
[fpm]=''
|
||||
[fpm-alpine]=''
|
||||
)
|
||||
|
@ -130,6 +136,7 @@ function create_variant() {
|
|||
s/%%DOWNLOAD_URL%%/'"$(sed -e 's/[\/&]/\\&/g' <<< "$url")"'/g;
|
||||
s/%%DOWNLOAD_URL_ASC%%/'"$(sed -e 's/[\/&]/\\&/g' <<< "$ascUrl")"'/g;
|
||||
s/%%CMD%%/'"${cmd[$variant]}"'/g;
|
||||
s|%%VARIANT_EXTRAS_ENV%%|'"${extras_env[$variant]}"'|g;
|
||||
s|%%VARIANT_EXTRAS%%|'"${extras[$variant]}"'|g;
|
||||
s/%%APCU_VERSION%%/'"${pecl_versions[APCu]}"'/g;
|
||||
s/%%MEMCACHED_VERSION%%/'"${pecl_versions[memcached]}"'/g;
|
||||
|
|
Loading…
Add table
Reference in a new issue