我已经安装了Homestead VM,并在我的Mac(OSX Yosemite)上设置了Moodle安装文件夹。 我也创build了'moodledata'文件夹,并通过我的系统命令行给予了权限0777以及文件夹'moodledata / sessions'(我试图在虚拟机内部通过SSH执行此操作,但似乎没有更改权限) 。 然而,通过我的系统检查权限之后,显示该文件夹是从VM内部写入的。
然后,我转到安装程序运行并创build数据库表,并做了检查,显示2检查警告:国际和xmlrpc检查
我不相信这些对于初始安装是必不可less的。 当我遇到pipe理员用户创build,我遇到了问题。 页面(/user/editadvanced.php?id=2)停止加载任何图像,当我发布表单时,我得到一个错误:'提交的sesskey不正确,表单不被接受! 我认为这可能是会议不可写在moodledata文件夹,但正如我已经检查,现在我已经不知道了!
我附上了一些截图。
非常感谢,迈克。
好了好几天后,我通过编辑NGINX配置文件解决了我自己的问题。 以下是默认情况下的内容:
server { listen 80; server_name example.com; root /home/forge/example.com; # FORGE SSL (DO NOT REMOVE!) # ssl_certificate; # ssl_certificate_key; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; index index.html index.htm index.php; charset utf-8; location / { try_files $uri $uri/ /index.php?$query_string; } location = /favicon.ico { access_log off; log_not_found off; } location = /robots.txt { access_log off; log_not_found off; } access_log off; error_log /var/log/nginx/example.com-error.log error; error_page 404 /index.php; location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } location ~ /\.ht { deny all; } }
这就是我改变它现在的作品:
server { listen 80; server_name example.com; #REPLACE SERVER NAME root /var/www/example.com/www/; #REPLACE MOODLE INSTALL PATH error_log /var/www/example.com/log/example.com_errors.log; #REPLACE MOODLE ERROR LOG PATH access_log /var/www/example.com/log/example.com_access.log; #REPLACE MOODLE ACCESS LOG PATH rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last; location / { index index.php index.html index.htm; try_files $uri $uri/ /index.php; } fastcgi_intercept_errors on; location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } location ~ /\.ht { deny all; } }
我没有时间去查看上述配置的哪个部分或哪些部分解决了问题,也许有人知道可以马上看到? 我怀疑这可能是重写规则? 无论哪种方式,我希望这将有助于未来的其他人,我很高兴得到这个工作!
我可以确认的只是该特定配置文件的重写部分,尽管在Moodle Nginx页面中没有记录这种方式。
我的猜测是location ~ [^/]\.php(/|$) {
部分和重写规则rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last;
和location ~ \.php$ {
指令。 将需要做一些测试改变位置指令,看看是否也适用。