Reverse Proxy Setup

Reverse Proxy Setup

by leon leon -
Number of replies: 1

We seem to be having a reverse proxy issue with our installation of Moodle 3.2.2+ (Build: 20170421)


The issue we are having is that Moodle uses absolute paths in the URLs. We are running Moodle behind a reverse proxy, and can rewrite the HTML as it passes through the reverse proxy (Apache) to substitute the backend server name from the friendly URL

 

There are some SVG/XMLNS images which we cannot rewrite. For example

https://moodle.website.com/moodle/theme/image.php/lambda/core/1493337062/help


Attachment moodle error.png
Average of ratings: -
In reply to leon leon

Re: Reverse Proxy Setup

by Matt T -

this probably isn't much help for you, but I resolved this by having the same domain name for both internal and external networks. Our internal DNS (which is needed for AD etc) resolves ourmoodle.com as an internal IP but our public DNS records return the reverse proxy. This is known as split brain DNS.

as the reverse proxy is configured to use our internal DNS servers it proxies through fine -  also means we don't have to stuff around with TLS since you can't get CA signed internal names anymore. As such the production moodle webservers actually run ssl certs on them as well as the reverse proxy 

I found it to be more reliable than rewriting because you don't have these teething issues - but it's not practicable in all cases