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