x-accell working

This commit is contained in:
Chris
2025-07-09 17:44:36 +02:00
parent 9cd543d351
commit 1dfdb4b0b2
6 changed files with 42 additions and 11 deletions

View File

@@ -7,6 +7,8 @@ WORKDIR /app/public
RUN install-php-extensions redis exif gd
ADD docker/rootfs/Caddyfile /etc/caddy/Caddyfile
# Add php.ini
ADD configs/php.ini /usr/local/etc/php/php.ini

28
docker/rootfs/Caddyfile Normal file
View File

@@ -0,0 +1,28 @@
{
frankenphp
}
localhost:80 {
log
encode zstd br gzip
root web/
#request_header X-Sendfile-Type x-accel-redirect
#request_header X-Accel-Mapping ../data=/data
intercept {
@sendfile header X-Accel-Redirect *
handle_response @sendfile {
root data/
rewrite * {resp.header.X-Accel-Redirect}
method * GET
header -X-Accel-Redirect
file_server
}
}
php_server {
try_files {path} index.php
}
}

View File

@@ -96,4 +96,4 @@ echo ' [+] Creating config'
_buildConfig > src/inc/config.inc.php
frankenphp php-server --listen ":80" --root /app/public/web
frankenphp run --config /etc/caddy/Caddyfile