2016-09-14 66 views
0

我们正试图将我们当前的Moodle 2.9.1安装从我们的Ubuntu服务器迁移到新的REHL 7将Moodle站点从Ubuntu迁移到REHL 7

我们采取了以下措施:

  1. 复制的目录

OLD-在/ var/WWW/moodledata 新建 - /数据/ WWW/moodledata

OLD-/var/www/html/moodle

new-/data/www/html/moodle

  1. Made MySQL-Dump的数据库。
  2. 由相同Apache配置在Ubuntu

我们从旧http://moodlesite.com做出了redirecthttps://moodlesite.com并获得:

不正确的访问发现,该服务器可以访问只能通过 http://moodlesite.com地址,对不起。请通知 服务器管理员。

然后按照这些步骤:

Change the following file: /home/xxxxxx/public_html/moodle/lib/setuplib.php 
Change - setuplib.php 
Redirect ($CFG->wwwroot, get_string('wwwrootmismatch', 'error', $CFG->wwwroot), 3); 
for 
Redirect ($CFG->wwwroot, get_string('wwwrootmismatch', 'error', $CFG->wwwroot), 0); 

Now when you access the link, Moodle redirects immediately to the www.<your registered domain> without the warning message. 

Another solution is to make changes in .htaccess file 

*************************************************************** 
suphp_configpath /home/myroot/public_html/php.ini 
Options +FollowSymlinks 
RewriteEngine on 
rewritecond %{http_host} ^www.domainname.com [nc] 
rewriterule ^(.*)$ http://domainname.com/$1 [r=301,nc] 
i.e. replace the myhost.com with your domain name 
*************************************************************** 

,并得到HTTP Error 500,检查了Apache的权限:

[[email protected] html]# pwd 
/data/www/html 
[[email protected] html]# chown -R apache:apache moodle/ 
[[email protected] html]# chown -R apache:apache ../moodledata/ 
[[email protected] html]# chmod -R 755 moodle/ 
[[email protected] html]# chmod -R 755 ../moodledata/ 
[[email protected] html]# systemctl restart httpd.service 
[[email protected] html]# apachectl configtest 
Syntax OK 

但错误依然存在。

我们错过了什么?

回答

0

您是否更改config.php中的wwwroot值?

$CFG->wwwroot = 'https://moodlesite.com'; 

您是否还将数据文件夹从旧服务器复制到新服务器?

$CFG->dataroot = '/moodle/data/folder'; 

迁移说明 - https://docs.moodle.org/29/en/Moodle_migration

+0

罗素你好,是的,我们已经在'config.php'最新的一切。 'wwwroot'是新的地址,dataroot是新的'/ data/www/html/moodle'。仍然得到HTTP 500错误... – StartVader