Saturday , August 19 2017
Home / Linux / How to update IP Address in Moodle Config.php in Ubuntu Server

How to update IP Address in Moodle Config.php in Ubuntu Server

Steps of How to update IP Address in Moodle Config.php in Ubuntu Server

Step #1 : Get the IP Address

  1. Login to the server
  2. after login type : ifconfig 

    enp0s3 Link encap:Ethernet HWaddr 08:00:27:e1:80:0f
    inet addr:192.168.1.5 Bcast:192.168.1.255 Mask:255.255.255.0
    inet6 addr: fe80::a00:27ff:fee1:800f/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:375 errors:0 dropped:0 overruns:0 frame:0
    TX packets:296 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:95728 (95.7 KB) TX bytes:122370 (122.3 KB)

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:65536 Metric:1
    RX packets:272 errors:0 dropped:0 overruns:0 frame:0
    TX packets:272 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1
    RX bytes:57398 (57.3 KB) TX bytes:57398 (57.3 KB)

  3. Now you have IP address of 192.168.1.5

Step #2 : Access Config.php

  1. Type > cd /var/www/html/moodle (moodle can be rename depending on how you named your folder)
  2. Type > sudo edit config.php
  3. Locate : $CFG->wwwroot = ‘http://192.168.1.3/moodle’; 

192.168.1.3 should be replaced with the recent IP Address : 192.168.1.5 then save the file

Check Also

How to Edit Linux Ubuntu Hosts File

How to Edit Linux Ubuntu Hosts File Open putty for windows or terminal or your …

Leave a Reply

Your email address will not be published. Required fields are marked *

*