1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2025-04-21 03:02:09 +00:00
This commit is contained in:
Joel Kåberg 2016-05-22 03:50:55 +02:00
parent 491701f0f6
commit 5a6f8f84bc
2 changed files with 29 additions and 36 deletions

View File

@ -12,10 +12,13 @@
} }
location /radicale { location /radicale {
uwsgi_pass unix:///tmp/radicale.sock; access_log /var/log/radicale/access.log;
error_log /var/log/radicale/error.log;
proxy_pass http://127.0.0.1:5232;
} }
#rewrite ^/.well-known/carddav /cloud/remote.php/carddav/ redirect; <-- fix this location ~ ^/.well-known/(caldav|carddav) {
#rewrite ^/.well-known/caldav /cloud/remote.php/caldav/ redirect; <-- fix this rewrite ^ /radicale$request_uri last;
}
# ADDITIONAL DIRECTIVES HERE # ADDITIONAL DIRECTIVES HERE

View File

@ -22,7 +22,7 @@ fi
apt-get purge -qq -y owncloud* apt-get purge -qq -y owncloud*
# Install it # Install it
apt_install install -y radicale uwsgi uwsgi-plugin-http uwsgi-plugin-python apt_install radicale uwsgi uwsgi-core
# Create Directories # Create Directories
mkdir -p $STORAGE_ROOT/radicale/etc/ mkdir -p $STORAGE_ROOT/radicale/etc/
@ -48,37 +48,26 @@ type = from_file
file = $STORAGE_ROOT/radicale/etc/rights file = $STORAGE_ROOT/radicale/etc/rights
[storage] [storage]
filesystem_folder = $STORAGE_ROOT/radicale/collections filesystem_folder = $STORAGE_ROOT/radicale/collections
[logging]
config = $STORAGE_ROOT/radicale/etc/logging
#debug = True
EOF EOF
# Logging config # Radicale rights config
cat > $STORAGE_ROOT/radicale/etc/logging <<EOF; cat > $STORAGE_ROOT/radicale/etc/rights <<EOF;
# Logging [admin]
[loggers] user: ^admin.*$
keys = root collection: .*
[handlers] permission: r
keys = console,file [public]
[formatters] user: .*
keys = simple,full collection: ^public(/.+)?$
[logger_root] permission: rw
level = DEBUG [domain-wide-access]
handlers = file user: ^.+@(.+)\..+$
[handler_console] collection: ^{0}/.+$
class = StreamHandler permission: r
level = DEBUG [owner-write]
args = (sys.stdout,) user: .+
formatter = simple collection: ^%(login)s/.*$
[handler_file] permission: w
class = FileHandler
args = ('$STORAGE_ROOT/radicale/radicale.log',)
level = INFO
formatter = full
[formatter_simple]
format = %(message)s
[formatter_full]
format = %(asctime)s - %(levelname)s: %(message)s
EOF EOF
# WSGI launch file # WSGI launch file
@ -92,16 +81,17 @@ application = radicale.Application()
EOF EOF
# UWSGI config file # UWSGI config file
cat > /etc/uwsgi/apps-available/radicale.ini <<EOF; cat > /etc/uwsgi/apps-available/radicale <<EOF;
[uwsgi] [uwsgi]
uid = www-data uid = www-data
gid = www-data gid = www-data
socket = /tmp/radicale.sock
plugins = http, python plugins = http, python
wsgi-file = $STORAGE_ROOT/radicale/radicale.wsgi wsgi-file = $STORAGE_ROOT/radicale/radicale.wsgi
pidfile = $STORAGE_ROOT/radicale/radicale.pid
EOF EOF
# Enabled the uwsgi app
ln -s /etc/uwsgi/apps-available/radicale /etc/uwsgi/apps-enabled/radicale
# Set proper rights # Set proper rights
chown -R www-data:www-data $STORAGE_ROOT/radicale chown -R www-data:www-data $STORAGE_ROOT/radicale