Page 1 of 1

Weird SSL problem

Posted: Sat May 27, 2006 12:35 am
by jryden
Hey Everyone!

I've run into a weird problem with SSL; I've (re)configured Apache to redirect all requests to https URLs using:

RewriteEngine On
RewriteRule ^(.*) https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

SWA works great, the SAC login console loads too but won't let me log in (which it will without the SSL configuration). The only error I can make out from caa.log with the SSL rewrite turned on is:

2006-05-26 23:53:09,924 FATAL [RESServiceHandler.GetMailNodesList:828] java.io.IOException: White spaces are required between publicId and systemId.:server.name.com

I saw some variations of SSL and SAC problems in the forums but didn't hit anything that would let me fix this. Any takers?

Posted: Sat May 27, 2006 12:49 am
by jryden
Hmm, it gets better. :) If I take out the rewrite rule, restart Apache and access https://... instead of http://... I'm able to log in to SAC. Is there something funny happening with the rewrite rules??

Posted: Sat May 27, 2006 12:15 pm
by florian
Not too weird actually...

SAC is a SOAP application, i.e. the JavaScript code running in your browser accesses the "Ubermanager" management server and this, in turn, accesses the "Remote Execution Service", basically our management agent.

All these accesses go over http - in a single server environment, these would get rewritten as well. The URLs for those services start with /caa and/or /res.

In your Rewrite command, you specify the "R" flag. AFAIK, this means send-back-a-redirect, which doesn't work with the JavaScript and Java-based HTML clients - they will report the redirect back to the app internally, but noone will handle it.

So I believe what you need to do is to exclude these URLs from rewriting...

Thx,
Florian.

Posted: Sat May 27, 2006 12:53 pm
by ScalixSupport
Thanks go to one of our SEs in the field, Darrell, for this one...

You can exclude the URLs like this

Code: Select all

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !^/caa/.*
RewriteCond %{REQUEST_FILENAME} !^/res/.*
RewriteRule ^/(.*) https://host.domain.com/$1 [R,L]


Cheers

Dave

Posted: Sat May 27, 2006 4:13 pm
by jryden
ScalixSupport wrote:Thanks go to one of our SEs in the field, Darrell, for this one...

You can exclude the URLs like this

Code: Select all

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !^/caa/.*
RewriteCond %{REQUEST_FILENAME} !^/res/.*
RewriteRule ^/(.*) https://host.domain.com/$1 [R,L]


Cheers

Dave


Sweet! That did it! Merci buckets guys.