0

This is probably a real newbie question, but I've searched and I don't really understand what I'm reading. I've set up a site in Apache2 and it's serving Radicale using WSGI. It all comes to a screaming halt in the logging. Apache2 reports that it doesn't have permission to write to /var/www/radicale/radicale.log, and when I look at it, the file is there but it's 0 bytes long and owned by used by Radicale. I'm guessing the problem is in my site file, but I'm going round in circles. Here is my site file:

ServerName myserver.domain.org

WSGIDaemonProcess radicale user=www-data group=www-data threads=1
WSGIProcessGroup radicale
WSGIScriptAlias / /var/www/radicale.wsgi

<Directory /var/www/intranet/calendars>
    WSGIApplicationGroup %{GLOBAL}
    AllowOverride None
    Order allow,deny
    allow from all
</Directory>

<Location /cal>
    AuthType basic
    AuthName "My Calendar"
    AuthBasicProvider file
    AuthUserFile /etc/radicale/radpasswd
    Require user olivers
</Location>
SSLEngine on
SSLCertificateFile  /etc/ssl/certs/harrison7sprcert.pem
SSLCertificateKeyFile   /etc/ssl/private/harrison7sprkey.pem

  • Your code will be running as the Apache user, not as the user that the log file likely has been created by at some point. Also, you should just configure any logging to send to ``stderr``, that way it will be saved to the Apache log files. It is generally not good practice to be writing separate log files out of a Python web application running under Apache, use the server logs instead. – Graham Dumpleton Nov 05 '16 at 04:47
  • I'd figured out that it's running as the Apache user. As for 'not good practice to be writing separate log files' Radicale either does not follow this recommendation or doesn't bother to documenting how to avoid this problem. I'll see if I can configure Radicale logging to stderr, so many thanks for the suggestion. – Oliver Sedlacek Dec 04 '16 at 12:08

0 Answers0