Mod_wsgi, the wsgi daemon visible behind _both_ http and https

I have apache vhost with SSL settings and mod_wsgi:

<VirtualHost 127.0.0.1-00-0043>

#[...]
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 a specific URL via http without ssl. So basically I want the _the_same_ WSGI daemon to be visible on two virtual hosts: one with ssl, one without. I want it to be the same daemon because I use some common variables in memory. A possible way (for example, 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 do I configure wsgi / apache for this? Is it possible?

+3
source share

Source: https://habr.com/ru/post/1719978/


All Articles