++ fix restore backup
This commit is contained in:
@@ -118,6 +118,28 @@ map \$host \$app_forwarded_proto {
|
||||
EOF
|
||||
ok "Forwarded scheme set to ${FORWARDED_PROTO}."
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# 2c. Upload ceiling, from a single variable.
|
||||
# nginx, PHP and the Laravel validation rule must agree: when they don't,
|
||||
# the smallest one wins and does so badly — nginx answers 413 with no body
|
||||
# after accepting zero bytes, so the browser's upload bar simply freezes and
|
||||
# the page has nothing to report. MAX_UPLOAD_MB drives all three
|
||||
# (config/app.php reads the same variable for the validation rule).
|
||||
# -----------------------------------------------------------------------------
|
||||
MAX_UPLOAD_MB="${MAX_UPLOAD_MB:-2048}"
|
||||
|
||||
cat > /etc/nginx/conf.d/upload-limit.conf <<EOF
|
||||
client_max_body_size ${MAX_UPLOAD_MB}m;
|
||||
EOF
|
||||
|
||||
cat > /usr/local/etc/php/conf.d/zz-upload-limit.ini <<EOF
|
||||
; Generated by entrypoint.sh from MAX_UPLOAD_MB — do not edit by hand.
|
||||
; The zz- prefix makes it load after custom.ini, so these win.
|
||||
upload_max_filesize = ${MAX_UPLOAD_MB}M
|
||||
post_max_size = ${MAX_UPLOAD_MB}M
|
||||
EOF
|
||||
ok "Upload ceiling set to ${MAX_UPLOAD_MB} MB."
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# 3. Storage symlink (public/storage -> storage/app/public)
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
[PHP]
|
||||
upload_max_filesize = 256M
|
||||
post_max_size = 256M
|
||||
; upload_max_filesize e post_max_size NON stanno qui: li genera entrypoint.sh
|
||||
; in conf.d/zz-upload-limit.ini a partire da MAX_UPLOAD_MB, insieme al
|
||||
; client_max_body_size di nginx, cosi' una sola variabile governa tutta la
|
||||
; catena. Rimetterli qui non farebbe danno (zz- viene caricato dopo e vince),
|
||||
; ma sarebbe una seconda fonte per lo stesso numero.
|
||||
memory_limit = 256M
|
||||
max_execution_time = 120
|
||||
max_input_vars = 3000
|
||||
|
||||
Reference in New Issue
Block a user