I'm currently setting up my own Mozilla Weave Sync-Server and since I want to use an SSL-encrypted connection to my server I have set up a subdomain as administrator, from where I am allowed to modify the vHost configuration of the subdomain.
I configured the following in froxlor:
<IfModule mod_rewrite.c>
RewriteEngine On
#If not using https, start using it
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</IfModule>
<Directory /var/customers/webs/user/weave>
Order deny,allow
Allow from all
</Directory>
WSGIProcessGroup sync
WSGIDaemonProcess sync user=sync group=sync processes=2 threads=25
WSGIPassAuthorization On
WSGIScriptAlias / /var/customers/webs/user/weave/sync.wsgi
Froxlor now generates two apache configurations in /etc/apache2/sites-enabled, one for "normal" (http) connections, and another for ssl (https) connections, both having basically the same content, except -of course- for the SSL Stuff.
Now the problem is, that apache throws an error due to "WSGIDaemonProcess" for the ssl configuration, because it already exists in the normal configuration, where it is not needed, since all incoming connections are redirected to use ssl anyways (see the rewrite rule). If I comment out the whole WSGI-part for the normal configuration, apache starts and the weave server works. Unfortunately, on the next webserver-configuration update from froxlor, the normal configuration will be restored, such that apache2 won't start correctly due to the WSGI error again.
Is there a way to prevent this from happening? I mean, can I configure two different vHost configurations, one for the normal case (without the WSGI stuff) and another one for the SSL case? Or can I maybe work with apache, doing something like "if connection is SSL then ", WSGI-Configuration, "done"? Any other suggestions?
Question
Sebastian Schneider
Hello,
I'm currently setting up my own Mozilla Weave Sync-Server and since I want to use an SSL-encrypted connection to my server I have set up a subdomain as administrator, from where I am allowed to modify the vHost configuration of the subdomain.
I configured the following in froxlor:
Froxlor now generates two apache configurations in /etc/apache2/sites-enabled, one for "normal" (http) connections, and another for ssl (https) connections, both having basically the same content, except -of course- for the SSL Stuff.
Now the problem is, that apache throws an error due to "WSGIDaemonProcess" for the ssl configuration, because it already exists in the normal configuration, where it is not needed, since all incoming connections are redirected to use ssl anyways (see the rewrite rule). If I comment out the whole WSGI-part for the normal configuration, apache starts and the weave server works. Unfortunately, on the next webserver-configuration update from froxlor, the normal configuration will be restored, such that apache2 won't start correctly due to the WSGI error again.
Is there a way to prevent this from happening? I mean, can I configure two different vHost configurations, one for the normal case (without the WSGI stuff) and another one for the SSL case? Or can I maybe work with apache, doing something like "if connection is SSL then ", WSGI-Configuration, "done"? Any other suggestions?
Sebastian
Link to comment
Share on other sites
4 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.