1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-04 15:54:48 +01:00

initial owncloud port, untested and unfinished

This commit is contained in:
jkaberg
2014-08-11 16:24:29 +02:00
parent 1312b0254b
commit 0899952fe1
3 changed files with 85 additions and 13 deletions

View File

@@ -26,27 +26,53 @@ server {
root $ROOT;
index index.html index.htm;
# Roundcube Webmail configuration.
rewrite ^/mail$ /mail/ redirect;
rewrite ^/mail/$ /mail/index.php;
location /mail/ {
# ownCloud configuration
# TODO: we should support owncloud to be loaded from www root, but for now we dont :-)
client_max_body_size 10G; # set max upload size
fastcgi_buffers 64 4K;
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
error_page 403 /owncloud/core/templates/403.php;
error_page 404 /owncloud/core/templates/404.php;
rewrite ^/caldav(.*)$ /owncloud/remote.php/caldav$1 redirect;
rewrite ^/carddav(.*)$ /owncloud/remote.php/carddav$1 redirect;
rewrite ^/webdav(.*)$ /owncloud/remote.php/webdav$1 redirect;
rewrite ^/owncloud$ /owncloud/ redirect;
rewrite ^/owncloud/$ /owncloud/index.php;
location /owncloud/ {
index index.php;
alias /usr/local/lib/roundcubemail/;
alias /usr/local/lib/owncloud/;
}
location ~ /mail/config/.* {
# A ~-style location is needed to give this precedence over the next block.
return 403;
}
location ~ /mail/.*\.php {
location ~ /owncloud/.*\.php {
include fastcgi_params;
fastcgi_split_path_info ^/mail(/.*)()$;
fastcgi_split_path_info ^/owncloud(/.*)()$;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/local/lib/roundcubemail/$fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME /usr/local/lib/owncloud/$fastcgi_script_name;
fastcgi_pass unix:/tmp/php-fastcgi.www-data.sock;
client_max_body_size 20M;
}
location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
deny all;
}
# Optional: set long EXPIRES header on static assets
location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
expires 30d;
# Optional: Don't log access to assets
access_log off;
}
# Webfinger configuration.
# TODO: fix this for owncloud: http://doc.owncloud.org/server/5.0/admin_manual/installation/installation_others.html
location = /.well-known/webfinger {
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /usr/local/bin/mailinabox-webfinger.php;