SID-00015: Using Twiki behind an external SSL proxy
| Status: |
Answered |
TWiki version: |
4.2.4 |
Perl version: |
5.008 |
| Category: |
CategoryDeployment |
Server OS: |
Solaris |
Last update: |
17 years ago |
I am attempting to set TWiki up behind a hardware based ssl proxy (F5 LTM). In other words, TWiki is accessed from the outside using https, but Apache is not aware and is serving http only. The scripts work fine, but all links inside the generated page are absolute, and are being generated as http instead of https.
What does TWiki use to construct the absolute link? As expected, properly setting
DefaultUrlHost doesn't fix the problem. Next I tried forcing the matter in Apache by adding:
RewriteEngine On
RewriteRule .* - [E=SCRIPT_URI:https://%{SERVER_NAME}%{ENV:SCRIPT_URL}]
I can see in the configure page that the above rewrite is working, but it doesn't help. The env. var is probably being set after the fact - I'm probably barking up the wrong tree with mod_rewrite.
Thoughts?
--
JeffHailer - 07 Jan 2009
Discussion and Answer
I changed
ScriptUrlPath and
PubUrlPath to an absolute URL, and it seems to have solved the problem. Obviously this is a hack - the config page warns me of "I expected this to look like "/twiki/bin" - and I have no idea what the adverse side effects may be.
--
JeffHailer - 07 Jan 2009
Not sure what side-effects this has. Check the HTML output if links look OK, and check links in e-mail notifications and registration e-mails.
--
PeterThoeny - 08 Jan 2009
Nothing bad so far - Thanks Peter.
--
JeffHailer - 08 Jan 2009
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.