重新配置config.php,修改增加代码如下:
if($_SERVER[‘HTTP_HOST’]==‘222.xxx.xxx.xxx’);// 外网ip,红色字体是在教程基础上增加的。
$CFG->wwwroot= ‘http://222.xxx.xxx.xxx/moodle’;
else
$CFG->wwwroot = ‘http://172.xxx.xxx.xxx/moodle’; //内网ip
重新配置config.php,修改增加代码如下:
if($_SERVER[‘HTTP_HOST’]==‘222.xxx.xxx.xxx’);// 外网ip,红色字体是在教程基础上增加的。
$CFG->wwwroot= ‘http://222.xxx.xxx.xxx/moodle’;
else
$CFG->wwwroot = ‘http://172.xxx.xxx.xxx/moodle’; //内网ip