Prev Previous Post   Next Post Next
Old 30th March 2012, 18:44
cfoe cfoe is offline
ISPConfig Developer
Join Date: Oct 2011
Location: NRW, Germany
Posts: 233
Thanks: 27
Thanked 57 Times in 32 Posts
Send a message via Skype™ to cfoe
Lightbulb Force https

Hi ISPConfig Devs,

I am currently in the re-customization phase after the latest ISPConfig 3 Update.

I am using a .htaccess file to enforce SSL on the subdomain of the control-panel. For me this is not the most elegant way of solving the problem.
Roundcube has a nice variable called "force_https". If it is true ssl is enforced.

The implementation in the index.php (of Roundcube 0.8 beta):

// check if https is required (for login) and redirect if necessary
if (empty($_SESSION['user_id']) && ($force_https = $RCMAIL->config->get('force_https', false))) {
  $https_port = is_bool($force_https) ? 443 : $force_https;
  if (!rcube_https_check($https_port)) {
    $host  = preg_replace('/:[0-9]+$/', '', $_SERVER['HTTP_HOST']);
    $host .= ($https_port != 443 ? ':' . $https_port : '');
    header('Location: https://' . $host . $_SERVER['REQUEST_URI']);
This way it would work "out-of-the-box" without .htaccess file in Apache and nginx.
I hope this could be taken into consideration for the next minor release.

Feature Request:

Greatings from Germany,

Last edited by cfoe; 30th March 2012 at 21:05. Reason: added link to feature request
Reply With Quote
Sponsored Links


enforce, https, ispconfig, ssl

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
haproxy with stunnel problem abubin Server Operation 6 10th April 2012 16:08
Force http to https for the admin panel GarGamel55 Installation/Configuration 3 23rd August 2011 11:46
How to force https with redirect subdomain binaryrogue General 3 13th March 2010 03:55
squid and https passthrough Xitron Installation/Configuration 0 5th November 2009 19:40
Force https on a directory TheMaximumWeasel General 1 25th June 2007 08:24

All times are GMT +2. The time now is 13:02.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.