Moodle
  1. Moodle
  2. MDL-9276

Errors with Moodle behind a reverse proxy

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.4
    • Fix Version/s: 2.0
    • Component/s: Course
    • Labels:
      None
    • Environment:
      Server: Linux with Apache 2.2
    • Affected Branches:
      MOODLE_16_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      We use moodle behind an Apache web server configured with mod_proxy and we get error in some elements (links, styles, ...) in some pages.
      The internal and external name of the published application is not the same so we have the following configuration:

      in the backend web server with Moodle 1.6.4 and Apache 2.0 we have:
      in config.php
      $CFG->wwwroot = "http://external_public_name/estudios";

      in the frontend web server with Apache 2.2 we have:
      in httpd.conf
      ProxyPass /estudios http://internal_server_name/moodle
      ProxyPassReverse /estudios http://internal_server_name/moodle

      When we login into Moodle and go to a course, in the Topic outline screen, for example
      http://external_public_name/estudios/course/view.php?id=2

      the central block styles are not aplied.

      The reason is that body class is not well formed.
      If we see the source code of the generated page we see over line 65

      <body class="http:-internal_servere_namecourse course-2" id="http:-internal_server_namecourse-view">

      I supose the correct one must be <body class="course course-2" id="course-view">

      This is only one error, we have detected more of the same type in the docs link in the footer of pages and in the nav bar of archives page.

      We have already tested it in Moodle 1.7 and 1.8 and the same errors ocurred.

      Regards

      Rafael

        Gliffy Diagrams

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: