Not logged in. · Lost password · Register

All posts by stephane (1)

topic: SSL Offload - protocol detection  in the forum: General Help and Support Server Setup
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
Close Smaller – Larger + Reply to this post:
Special characters:
Special queries
Go to forum
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2020-02-17, 08:11:01 (UTC +01:00)