Posts

Showing posts with the label rewrite

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;  ...

Drupal - Enable Clean URLs in Drupal 7 with Nginx

To enable Clean URLs in Drupal 7 with Nginx, using this following rule: >> /etc/nginx/sites-available/mysite server {         listen 80;         server_name [host];         root /var/www/[document_root]; ## <-- Your only path reference.         # Enable compression, this will help if you have for instance advagg module         # by serving Gzip versions of the files.         gzip_static on;         location = /favicon.ico {                 log_not_found off;                 access_log off;         }         location = /robots.txt {                 allow all;                 log_not_found off;         ...