Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mod_wsgi, wsgi daemon visible behind _both_ http and https

I have apache vhost configured with SSL and mod_wsgi its working fine:

< VirtualHost 127.0.0.1:443 >

#[...]
SSLEngine on 
#[...]
WSGIScriptAlias / /home/maciek/workspace/imid2py/wsgihandler.py
WSGIDaemonProcess web2py user=maciek group=www-data \ 
              home=/home/maciek/workspace/imid2py/  \
              processes=10 maximum-requests=500

< Location "/" >

   #[...]
   WSGIProcessGroup web2py

< /Location >

< /VirtualHost >

However, I need to allow connections to specific url over http without ssl. So basically I want _the_same_ WSGI daemon to be visible on two virtual hosts: one with ssl, one without. I want this to be same daemon, because I use some common variables in memory. A way around is possible (ex, storing them in db) but painstaking.

< VirtualHost 127.0.0.1:80>

    <Location "/welcome/default/handleRequest">
            WSGIProcessGroup web2py  #I want this to be the same daemon as above
    </Location>

< /VirtualHost >

How can I configure wsgi/apache to do that? Is it possible?

like image 526
macieksk Avatar asked Mar 24 '26 23:03

macieksk


1 Answers

This is covered by web2py documentation in web2py book. Go read the sections of that book. See links at:

http://code.google.com/p/modwsgi/wiki/IntegrationWithWeb2Py

like image 60
Graham Dumpleton Avatar answered Mar 28 '26 01:03

Graham Dumpleton



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!