Table des matières

Héberger son calendrier

Radicale

Le fichier /etc/radicale/config

[server]
# CE QUE VOUS VOULEZ, EST IGNORE VIA NGINX
...

[storage]
type = filesystem
# stocker les calendriers dans le dossier collections
filesystem_folder = /var/www/calendrier.domaine.org/collections

[logging]
# fichier de configuration du logging
config = /etc/radicale/logging

Le fichier /etc/radicale/logging

# Loggers, handlers and formatters keys

[loggers]
# Loggers names, main configuration slots
keys = root

[handlers]
# Logging handlers, defining logging output methods
keys = file

[formatters]
# Logging formatters
keys = simple,full


# Loggers

[logger_root]
# Root logger
level = INFO
handlers = file


# Handlers

[handler_file]
# File handler
class = FileHandler
args = ('/var/www/calendar.trigaux.eu/radicale.log',)
formatter = full


# Formatters

[formatter_simple]
# Simple output format
format = %(message)s

[formatter_full]
# Full output format
format = %(asctime)s - %(levelname)s: %(message)s

NGINX configuration

Fichier /etc/nginx/sites-enable/calendar.domaine.org.conf

server {
    server_name calendar.mondomaine.org;
    listen 443;

    ssl on;
    ssl_certificate /etc/ssl/cacert/mondomaine.org.pem;
    ssl_certificate_key /etc/ssl/cacert/mondomaine.org.key;
    location / {
        try_files $uri @proxy_to_app;
    }
    location @proxy_to_app {
        uwsgi_pass 127.0.0.1:3031;
        include uwsgi_params;
    }
}

uWSGI

Emperor mode, lancer avec la commande uwsgi –plugins python –emperor /etc/uwsgi/vassals/

# fichier /etc/uwsgi/vassals/calendar.ini
[uwsgi]
master = true
processes = 2 # Simple rule is no. of cores on machine
plugins = python
socket = 127.0.0.1:3031
chdir = /var/www/calendar.domaine.org
wsgi-file = /var/www/calendar.domaine.org/radicale.wsgi
module = calendar
logto = /var/log/uwsgi/%n.log
vacuum = true
uid = www-data

WSGI

Fichier /var/www/calendar.domaine.org/radicale.wsgi

import radicale
radicale.log.start()
application = radicale.Application()