Installation error

Re: Installation error

by Diógenes Konrad Götz -
Number of replies: 1

I know that it's a old thread, but I can help another persons with this same problem in the future.

The problem was, that you miss a nginx configuration on virtual host section.
https://docs.moodle.org/38/en/Nginx

location ~ ^(.+\.php)(.*)$ {
    root /usr/share/nginx/html/moodle/;
    fastcgi_split_path_info ^(.+\.php)(.*)$;
    fastcgi_index index.php;
    fastcgi_pass 127.0.0.1:9000;
    include /etc/nginx/mime.types;
    include fastcgi_params;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

In reply to Diógenes Konrad Götz

Re: Installation error

by Vito Corleone -
Sorry for possible a very dumb question but where exactly do you have to write that piece of code?

I’m installing an 3.9 moodle in a Ubuntu Server (18.04) and the same happens. All seems all right but right after the installation the same happens and it wasn’t possible to continue any further.

I have two options:
- /etc/nginx/nginx.conf
- /etc/nginx/sites-available/mysite.com

we were trying to put it at the end of /etc/nginx/nginx.conf but when we check in the terminal with

sudo nginx -t

there appears another error (but maybe there was necessary to put it in another part of the file)

By the way the terms mentioned in the code

PATH_INFO
SCRIPT_FILENAME

I added them manually into /etc/nginx/fastcgi_params

That would be.


Thanks a lot!!!