Struggled with Moodle (Nginx)

Post Reply
absolutemusik
Posts: 13
Joined: Wed Feb 03, 2021 10:01 am

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.
Attachments
test_with_nginx-amended.png
test_with_nginx-amended.png (44.66 KiB)
test_with_nginx.png
test_with_nginx.png (45.15 KiB)
Last edited by absolutemusik on Thu Feb 11, 2021 4:02 pm, edited 1 time in total.
User avatar
myVesta
Site Admin
Posts: 924
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

if you install official VestaCP on Debian9, in nginx+fpm variant, and put Moodle template for nginx, is it working?
absolutemusik
Posts: 13
Joined: Wed Feb 03, 2021 10:01 am

Let me start a VM to try. Thanks for your suggestion.
User avatar
myVesta
Site Admin
Posts: 924
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

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.
str3ssz
Posts: 2
Joined: Sat Feb 13, 2021 9:03 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.
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
Last edited by str3ssz on Mon Feb 15, 2021 5:27 pm, edited 2 times in total.
User avatar
myVesta
Site Admin
Posts: 924
Joined: Fri Jun 19, 2020 9:59 am
Has thanked: 8 times
Been thanked: 6 times

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.
str3ssz
Posts: 2
Joined: Sat Feb 13, 2021 9:03 pm

It works.
Thank you for your help.
Post Reply