Hi, I am trying to setup an apache vhost with SSL to serve web2py. I have succeeded in setting up mod_wsgi, with the following vhost configuration file:
<VirtualHost *:80> ServerName www.example.com WSGIDaemonProcess web2py user=www-data group=www-data \ display-name=%{GROUP} WSGIProcessGroup web2py WSGIScriptAlias / /var/www/web2py/wsgihandler.py <Directory /var/www/web2py> AllowOverride None Order Allow,Deny Deny from all <Files wsgihandler.py> Allow from all </Files> </Directory> AliasMatch ^/([^/]+)/static/(.*) \ /var/www/web2py/applications/$1/static/$2 <Directory /var/www/web2py/applications/*/static/> Order Allow,Deny Allow from all </Directory> <Location /admin> Deny from all </Location> <LocationMatch ^/([^/]+)/appadmin> Deny from all </LocationMatch> </VirtualHost> Now I need to setup the SSL part. I am trying with this: NameVirtualHost *:443 <VirtualHost *:443> ServerName portal.wavilon.com WSGIDaemonProcess web2py user=www-data group=www-data display-name=%{ GROUP} WSGIScriptAlias / /var/www/web2py/wsgihandler.py # static files do not need WSGI <LocationMatch "(/[\w_]*/static/.*)"> Order Allow,Deny Allow from all </LocationMatch> # everything else goes to web2py via wsgi <Location "/"> Order deny,allow Allow from all WSGIProcessGroup web2py </Location> AliasMatch ^/([^/]+)/static/(.*) /var/www/web2py/applications/$1/static/$2 <Directory /var/www/web2py/applications/*/static/> Order Allow,Deny Allow from all </Directory> <Location /admin> Deny from all </Location> <LocationMatch ^/([^/]+)/appadmin> Deny from all </LocationMatch> SSLEngine On SSLCertificateKeyFile /etc/ssl/private/server.insecure.key SSLCertificateFile /etc/ssl/certs/server.selfsigned.crt # SSL workaround for MS Internet Explorer BrowserMatch "MSIE [2-6]" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0 BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown </VirtualHost> But this is not yet working. Can somebody comment, or better yet, can somebody provide an example of a vhost configuration for mod_wsgi + ssl + web2py? Thanks, Daniel --