How to specify WSGIDaemonProcess vhost Option when using SSL

Discussion in 'Installation/Configuration' started by andreash, Mar 31, 2013.

  1. andreash

    andreash New Member

    Hi,

    in a site using SSL, I want to configure mod_wsgi to serve Django. So I add the following to the "Apache Directives":

    Code:
    WSGIScriptAlias / /var/www/example.com/django/mysite/wsgi.py
    WSGIDaemonProcess landwg.de python-path=/var/www/example.com/django:/var/www/example.com/pyenv/lib/python2.6/site-packages
    WSGIProcessGroup landwg.de
    
    <Directory /var/www/example.com/django/mysite>
    <Files wsgi.py>
    Order deny,allow
    Allow from all
    </Files>
    </Directory>
    I have SSL enabled for the site. Now, when I try to restart apache, I get the following error:

    And indeed, the WSGI daemon definition is included twice. I see two options here:

    a) Since I want to enforce SSL for this site (haven't figured out how to do that -- is it possible using ispconfig only?), I don't need the WSGI Daemon definition in the Port 80 Vhost. But how could I do that in ispconfig?

    b) The parameter I give to the WSGIDaemonProcess directive should differ between the port 80 and port 443 vhosts. Is this possible?

    Any help is greatly appreciated :)
     
  2. Diggo

    Diggo New Member

    Allthough this is a very old topic, i have exactly the same problem. Have you found a solution to that yet?
     
  3. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Theres no option for setting different directives to ssl and non-ssl vhosts inside ISPConfig yet.
     
  4. Diggo

    Diggo New Member

    Thanks for the quick reply! Then i can quit on searching a solution for this ;) Looks like i have to set up a separate small vserver for this.
     
  5. felipec84

    felipec84 New Member

    I know this post id awfully old, but I implement a solution for this same problem (WSGIDaemonProcess in ispconfig), and I couldn't find any quick solution available, so I put for my future references.

    I basically surround WSGIDaemonProcess with an IfDefine that is called only the first time it run.

    Code:
    WSGIScriptAlias / /var/www/example.com/django/mysite/wsgi.py
    <IfDefine !WSGIDaemonProcessDefinedlandwg>
    Define WSGIDaemonProcessDefinedlandwg
    WSGIDaemonProcess landwg.de python-path=/var/www/example.com/django:/var/www/example.com/pyenv/lib/python2.6/site-packages
    </IfDefine>
    WSGIProcessGroup landwg.de
    
    <Directory /var/www/example.com/django/mysite>
    <Files wsgi.py>
    Order deny,allow
    Allow from all
    </Files>
    </Directory>
     

Share This Page