location ^/moodle {
   alias /opt/iiab/moodle;
   try_files $uri $uri/ index.php =404;
}
location ~ /moodle/(.*)\.php {
    root /opt/iiab/;
    proxy_set_header X-Real-IP  $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header Host $host;
    include fastcgi_params;
    fastcgi_index index.php;
    fastcgi_pass php;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_param   SCRIPT_FILENAME    $document_root$fastcgi_script_name;
    fastcgi_param   SCRIPT_NAME        $fastcgi_script_name;
}
