I fixed it after trying to reproduce it in a new VM. The problem was that I put the WSGI config bits into the VirtualHost for port 80. It contains a Rewrite to forward everything to an SSL-secured connection. Thus, I needed to put the WSGI parameters into the VirtualHost at port 443.