Skip to content

Commit

Permalink
enable xsendfile and fix #26
Browse files Browse the repository at this point in the history
  • Loading branch information
timlegge committed May 5, 2020
1 parent 460b40d commit 77d8aa8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 16 deletions.
6 changes: 0 additions & 6 deletions .vscode/settings.json

This file was deleted.

5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ RUN cd /var/www/foswiki && \
rm -fr /var/www/foswiki/working/configure/download/* && \
rm -fr /var/www/foswiki/working/configure/backup/*

RUN cd /var/www/foswiki && \
tools/configure -save -set {PermittedRedirectHostUrls}='http://docker-foswiki.local:8765,https://docker-foswiki.local:8443' && \
tools/configure -save -set {XSendFileContrib}{Header}='X-Accel-Redirect' && \
tools/configure -save -set {XSendFileContrib}{Location}='/files'

RUN mkdir -p /run/nginx && \
mkdir -p /etc/nginx/conf.d

Expand Down
7 changes: 2 additions & 5 deletions https/nginx.default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,10 @@ server {

# any other static files need to be sanctioned by the foswiki backened
location /pub {
root $foswiki_root;
rewrite ^/pub/(.*)$ /bin/viewfile/$1;
# or by XSendFileContrib using
#
# The following setting must be in LocalSite.cfg
# {XSendFileContrib}{Header} = 'X-Accel-Redirect';
# {XSendFileContrib}{Location} = '/files';
#rewrite ^/pub/(.*)$ /bin/xsendfile/$1;
rewrite ^/pub/(.*)$ /bin/xsendfile/$1;
}

# internal location that sendfile serves sanctioned static files from
Expand Down
7 changes: 2 additions & 5 deletions nginx.default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,10 @@ server {

# any other static files need to be sanctioned by the foswiki backened
location /pub {
root $foswiki_root;
rewrite ^/pub/(.*)$ /bin/viewfile/$1;
# or by XSendFileContrib using
#
# The following setting must be in LocalSite.cfg
# {XSendFileContrib}{Header} = 'X-Accel-Redirect';
# {XSendFileContrib}{Location} = '/files';
#rewrite ^/pub/(.*)$ /bin/xsendfile/$1;
rewrite ^/pub/(.*)$ /bin/xsendfile/$1;
}

# internal location that sendfile serves sanctioned static files from
Expand Down

1 comment on commit 77d8aa8

@rogeriomachado666
Copy link

@rogeriomachado666 rogeriomachado666 commented on 77d8aa8 May 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tag v1.13 v1.14 points to master that is breaked (xsendfile don't work, cause it needs perl mmagic). Image v1.13,v1.14 don't work on docker hub
tag 1.13 is ok

Please sign in to comment.