Пример настройки wsgi приложения через ssl
Проверено на ubuntu 10.04
Включаем модуль ssl
sudo a2enmod ssl
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
ServerName localhost
ServerAdmin webmaster@localhost
WSGIDaemonProcess main user=www-data group=www-data processes=1 threads=5
WSGIScriptAlias / /var/www/main/index.wsgi
<Directory /var/www/main>
WSGIProcessGroup main
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
LogLevel warn
CustomLog /var/log/apache2/ssl_access.log combined
# SSL Engine Switch:
SSLEngine on
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
BrowserMatch "MSIE [2-6]" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
# MSIE 7 and newer should be able to use keepalive
BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown
</VirtualHost>
</IfModule>
sudo a2ensite mysite-ssl
sudo /etc/init.d/apache2 restart