Moodle with SSL behind Varnish
Ok, after a whole morning working on my moodle server, I finally made it work with SSL while standing behind a Varnish cache server. Things are just as simple as the following steps: A. Moodle Server Configuration: 1. Moodle's config.php: tell moodle to acknowledge the ssl proxy (the varnish) and provide users access via SSL link ... $CFG->wwwroot = 'https://mymoodle.com'; $CFG->sslproxy = true; ... 2. Nginx's configuration: one important thing here is that we still have to config the nginx to serve moodle at port 80 (without ssl) despite the moodle's configuration server { listen 80; root /var/www/moodle; index index.php index.html index.htm; server_name mymoodle.com; access_log /var/log/nginx/moodle-access.log; error_log /var/log/nginx/moodle-error.log; ...