Page 1 of 1

Struggled with Moodle (Nginx)

Posted: Thu Feb 11, 2021 3:09 pm
by absolutemusik
I am working on nginx as the 1st time user (previously with Apache for years).
Debian 10.7
Php 7.3 (fpm)
MariaDB 10.3.27

File: /home/admin/conf/web/example.com.nginx.ssl.conf (also example.com.nginx.conf)

Actually, I am trying many different options and settings. It is now showing me "file not found" for all links including "log in" in the front page. :shock:

location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_pass unix:/run/php/php7.3-fpm-example.com.sock;
include fastcgi_params;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

I have found the index.php misplaced. Unfortunately, the amendment doesn't help.

Re: Struggled with Moodle (Nginx)

Posted: Thu Feb 11, 2021 3:14 pm
by myVesta
if you install official VestaCP on Debian9, in nginx+fpm variant, and put Moodle template for nginx, is it working?

Re: Struggled with Moodle (Nginx)

Posted: Thu Feb 11, 2021 4:03 pm
by absolutemusik
Let me start a VM to try. Thanks for your suggestion.

Re: Struggled with Moodle (Nginx)

Posted: Fri Feb 12, 2021 6:48 pm
by myVesta
Actually, you can install myVesta too, in nginx+php-fpm variant (without Apache).
If it works, we can easily make it works on variant with Apache.

Re: Struggled with Moodle

Posted: Mon Feb 15, 2021 5:25 pm
by str3ssz
Hello dpeca,

I also try to install Moodle (w Apache & nginx proxy) but I can't finish the procedure becouse I need to put moodledata directory outside of web folder (public_html) but with read/write access.
I tried few things:
make a folder in /home/user or in home/user/web and add to open basedir the path, but no luck
if I made the folder in user/tmp it works ( but I can't let it there)

Can you help me please, how to make open basedir work for one of those folders ?

Thank you for your help in advance.
str3ssz

Re: Struggled with Moodle

Posted: Mon Feb 15, 2021 5:42 pm
by myVesta
str3ssz wrote: Mon Feb 15, 2021 5:25 pm Hello dpeca,

I also try to install Moodle (w Apache & nginx proxy) but I can't finish the procedure becouse I need to put moodledata directory outside of web folder (public_html) but with read/write access.
viewtopic.php?f=18&t=54
So, find open_basedir in pool.d folder, and put one level up of folder, i mean, remove "/public_html" from "open_basedir" line.
And restart php-fpm.

Re: Struggled with Moodle (Nginx)

Posted: Mon Feb 15, 2021 6:17 pm
by str3ssz
It works.
Thank you for your help.