ich es endlich machen, ich mit auf einer virtuellen Maschine testen zu arbeiten:
nginx Version: nginx/1.10.0 PHP 7.1.6 mysql Ver 14.14 Distrib 5.7.18
Zum nginx Standarddatei i fügen Sie diese:
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
include fastcgi_params;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location /dataroot/ {
internal;
alias /var/www/moodledata/; # ensure the path ends with/
}
Zum config.php Stimmungs le i hat dieses Bild:
$CFG->xsendfile = 'X-Accel-Redirect';
$CFG->xsendfilealiases = array(
'/dataroot/' => $CFG->dataroot
);
Dies ist, wie meine Standard-nginx-Datei wie folgt aussieht:
Server Block:
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;
server_name _;
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_pass unix:/var/run/php/php7.1-fpm.sock;
include fastcgi_params;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;
}
location /dataroot/ {
internal;
alias /var/www/moodledata/; # ensure the path ends with/
}
try_files $uri $uri/ /index.php?args;
}
Und das ist die moodle config.php:
<?php
unset($CFG); // Ignore this line
global $CFG; // This is necessary here for PHPUnit execution
$CFG = new stdClass();
$CFG->dbtype = 'mysqli';
$CFG->dblibrary = 'native';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle';
$CFG->dbuser = 'dbusername';
$CFG->dbpass = 'dbpassword';
$CFG->prefix = 'mdl_';
$CFG->dboptions = array(
'dbpersist' => 0,
'dbsocket' => '',
'dbport' => 3306,
'dbhandlesoptions' => false,
'dbcollation' => 'utf8mb4_general_ci',
);
$CFG->wwwroot = 'http://localhost/moodle';
$CFG->dataroot = '/var/www/moodledata';
$CFG->directorypermissions = 0777;
$CFG->admin = 'admin';
$CFG->xsendfile = 'X-Accel-Redirect';
$CFG->xsendfilealiases = array(
'/dataroot/' => $CFG->dataroot
);
require_once(__DIR__ . '/lib/setup.php'); // Do not edit
Ich habe die php.ini-Datei nicht geändert. oder die www.conf von php.Hier
ist die Seite, wo ich die Info bekam:
Um nginx und Moodles config.php zu konfigurieren: https://docs.moodle.org/33/en/Nginx#XSendfile_aka_X-Accel-Redirect
Wenn PHP installieren ich diese Module installieren Sie empfehlen:
sudo apt-get install php7.1-fpm php7.1-mysql php7.1-common php7.1-cgi php7.1-curl php7.1-cli php7.1-dev php7.1-gd php7.1-gmp php7.1-xml php7.1-xmlrpc php7.1-zip php7.1-xls php7.1-opcache php7.1-mbstring php7.1-soap php7.1-intl graphviz aspell php7.1-pspell php7.1-ldap
sorry für die späte antwort, ich habe das versucht und es hat nicht funktioniert, ich sah es in anderen post. –