Skip to content

Commit 9d5a1f4

Browse files
author
Arturo Blanco
authored
Update moodle.stpl (hestiacp#1419)
Fix moodle error open_basedir on private/moodledata
1 parent f416e74 commit 9d5a1f4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

install/deb/templates/web/nginx/php-fpm/moodle.stpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ server {
6161

6262
location ~ [^/]\.php(/|$) {
6363
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
64-
if (!-f $document_root$fastcgi_script_name) {
65-
return 404;
66-
}
64+
fastcgi_split_path_info ^(.+\.php)($|/.*);
65+
try_files $fastcgi_script_name =404;
6766

6867
fastcgi_pass %backend_lsnr%;
6968
fastcgi_index index.php;
7069
fastcgi_param SCRIPT_FILENAME $request_filename;
70+
fastcgi_param PHP_VALUE open_basedir="/home/%user%/web/%domain%/private/moodledata:/home/%user%/web/%domain%/public_html:/home/%user%/web/%domain%/public_shtml:/home/%user%/tmp:/var/www/html:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/phppgadmin:/etc/roundcube:/var/lib/roundcube:/tmp:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt";
7171
fastcgi_intercept_errors on;
7272
include /etc/nginx/fastcgi_params;
7373
}

0 commit comments

Comments
 (0)