mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-03-05 15:57:23 +01:00
owncloud: support MOD_X_ACCEL_REDIRECT_ENABLED
This lets downloads from the file app work.
This commit is contained in:
@@ -72,6 +72,14 @@ server {
|
||||
client_max_body_size 1G;
|
||||
fastcgi_buffers 64 4K;
|
||||
}
|
||||
location ^~ /cloud/data {
|
||||
# In order to support MOD_X_ACCEL_REDIRECT_ENABLED, we need to expose
|
||||
# the data directory but only allow 'internal' redirects within nginx
|
||||
# so that this is not exposed to the world.
|
||||
internal;
|
||||
alias $STORAGE_ROOT/owncloud;
|
||||
}
|
||||
|
||||
|
||||
location ~ ^/((caldav|carddav|webdav).*)$ {
|
||||
# Z-Push doesn't like getting a redirect, and a plain rewrite didn't work either.
|
||||
@@ -79,13 +87,6 @@ server {
|
||||
proxy_pass https://$HOSTNAME/cloud/remote.php/$1;
|
||||
}
|
||||
|
||||
# location ^~ /cloud/data {
|
||||
# internal;
|
||||
# # Set 'alias' if not using the default 'datadirectory'
|
||||
# # TODO: Since this is auto generated, we need a better approach!
|
||||
# alias /home/user-data/owncloud;
|
||||
# }
|
||||
|
||||
rewrite ^/.well-known/host-meta /cloud/public.php?service=host-meta last;
|
||||
rewrite ^/.well-known/host-meta.json /cloud/public.php?service=host-meta-json last;
|
||||
rewrite ^/.well-known/carddav /cloud/remote.php/carddav/ redirect;
|
||||
|
||||
Reference in New Issue
Block a user