Jump to content
Froxlor Forum
  • 0

[solved] Different vHost Configurations SSL/non-SSL for the same domain


Sebastian Schneider

Question

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:

 <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?

 

Sebastian

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

you could add the WSGI stuff in a manually-created vhost file which will not be maintained by Froxlor itself. E.g. "/etc/apache2/sites-enabled/002-my-wsgi-stuff.conf"

Thank you for you answer!

 

Can I just create a file with:

 

WSGIProcessGroup sync

WSGIDaemonProcess sync user=doc group=doc processes=2 threads=25

WSGIPassAuthorization On

WSGIScriptAlias / /var/customers/webs/doc/weave/sync.wsgi

 

in "/etc/apache2/sites-enabled/002-my-wsgi-stuff.conf"? How would the server know that this configuration belongs to the virtual host I configured in froxlor. Or did you mean, I have to create a copy of the configuration files froxlor creates, and remove the wsgi stuff from the normal configuration file. Then, how do I prevent froxlor from generating the configuration files for the domain if I use my own ones?

Link to comment
Share on other sites

no you have to create a file and enter a FULL Vhost-directive.

 

Then, how do I prevent froxlor from generating the configuration files for the domain if I use my own ones?

 

If you need the domains to be added to Froxlor than "not at all". But you said you add the wsgi stuff only using SSL, so just don't use your domains for ssl in froxlor and the manually created configs will be used.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...