Quantcast
Channel: Installing and upgrading help
Viewing all articles
Browse latest Browse all 46758

Moodle 2.3.8 + NGINX setup (SOLVED)

$
0
0
by John Riviera.  

While I was struggling to setup Moodle 2.3 / NGINX, I could not find working solutions from the start. And the purpose of this post was to raise the question "How to do it". But since I found the answer, I'm posting working solution.

First of all, there is common misconception that NGINX is hard to configure with Moodle due it's rewriting rules. That's why it is difficult to find clues for those who knows little coding or IT experience but don't want to learn NGINX in order to install Moodle.

My goal was not to disable "Slash argument" at Server>HTTP, but to solve the whole issue like SCORM player, which is ignoring "Slash argument" values at all.

My setup:

Debian 6

NGINX 1.5.3 with FPM

PHP 5.4.17

Moodle 2.3.8

In my scenario moodle is installed under subfolder: example.com/moodle.

Vhost config:

server {
     server_name  example.com www.example.com;
     rewrite ^/moodle/(.*.php)(/)(.*)$ /moodle/$1?file=/$3 last;

  location ^~ /moodle {
     try_files $uri$uri/ /index.php?q=$request_uri;
     index index.php index.html index.htm;

  location ~ .php$ {
     fastcgi_split_path_info ^(.+.php)(/.+)$;
     fastcgi_pass 127.0.0.1:9090;   
     include      includes/fastcgi_params.conf;
        }
        }
        }

Note that rewrite rule should be in {server} section, not in {location}.


Viewing all articles
Browse latest Browse all 46758

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>