mirror of
https://github.com/HaschekSolutions/pictshare.git
synced 2025-11-20 15:08:00 +00:00
x-accell working
This commit is contained in:
@@ -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
28
docker/rootfs/Caddyfile
Normal 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
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user