2016-09-14 67 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