Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-24332

Moodle 2.0 SSL Termination with Squid

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Installation
    • Labels:
      None
    • Environment:
      Windows 2003, IIS, Squid
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      When i set these in config.php

      $CFG->wwwroot = 'https://...';
      $CFG->sslproxy = true;

      Most things work fine.
      Except some forms post back to http:// (eg create admin user, add course) and i get a warning for unsecure data.
      But it i didnt have http:// mapped too i suppose it would error.

      I changed setuplib.php setup_get_remote_url()

      } else if (stripos($_SERVER['SERVER_SOFTWARE'], 'iis') !== false) {
      //IIS - needs a lot of tweaking to make it work

      if($_SERVER['HTTP_FRONT_END_HTTPS'] == 'On') {
      $rurl['scheme'] = 'https';
      } else {
      $rurl['scheme'] = ($_SERVER['HTTPS'] == 'off') ? 'http' : 'https';
      }

      then $FULLME gets calculated correctly

      i suppose another way to fix it would be in initialise_fullme() and force the scheme to be https:// when sslproxy is turned on.

      if (empty($CFG->sslproxy)) {
      if ($rurl['scheme'] == 'http' and $wwwroot['scheme'] == 'https')

      { print_error('sslonlyaccess', 'error'); }

      } else {
      $rurl['scheme'] = 'https';
      }

        Attachments

          Activity

            People

            Assignee:
            skodak Petr Skoda
            Reporter:
            djeeg djeeg
            Tester:
            Nobody
            Participants:
            Component watchers:
            Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              24/Nov/10