Not logged in. · Lost password · Register
Forum: General Help and Support Server Setup RSS
SSL Offload - protocol detection
stephane #1
Member since Jul 2009 · 1 post
Group memberships: Members
Show profile · Link to this post
Subject: SSL Offload - protocol detection

Our company is using SSL offload - handled by Netscalers - with Apache web servers running non-ssl http behind them. Our dokuwiki is then accessed by https://a.b.c.d/dokuwiki, where a.b.c.d is a public internet address.

I found that dokuwiki isn't compatible with such a setup, because the function getBaseURL (file: inc/init.php), which returns a path containing protocol, uses function is_ssl(), which checks the SERVER['HTTPS'] environment variable. Login, Logout and Page Edit are the affected functionalities, which will redirect to http://a.b.c.d/dokuwiki/... instead of using https.

This is because the SERVER['HTTPS'] variable is not set in case of SSL offloading. But protocol should be https nevertheless - from the external user point of view.

I found that replacing the line (in inc/init.php):
  return $proto.$host.$port.$dir;
  return $dir;

fixed my issue.

Hope this helps.
- Stéphane
andi (Administrator) #2
User title: splitbrain
Member since May 2006 · 3510 posts · Location: Berlin Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Just set the baseurl manually in the config
Read this if you don't get any useful answers.
Lies dies wenn du keine hilfreichen Antworten bekommst.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2020-01-23, 06:54:43 (UTC +01:00)