I couldn't see apache when I write ip on browser..Now it is working fine. I am attaching a screenshot here
However, I don't know how to redirect to my moodle...
Now when I write ip address , I am only redirecting to apache not the moodle...
# The ServerName directive sets the request scheme, hostname and port t$
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
My super user for mysql is root and password...
I am attaching my config file here...
my moodle is located in /var/www folder..
<?php // Moodle configuration file
$CFG = new stdClass();
$CFG->dbtype = 'mysqli';
$CFG->dblibrary = 'native';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle';
$CFG->dbuser = 'db';
$CFG->dbpass = 'pass';
$CFG->prefix = 'm_';
$CFG->dboptions = array (
'dbpersist' => 0,
'dbsocket' => 1,
$CFG->wwwroot = 'http://172.20.1.171';
$CFG->dataroot = '/var/moodledata';
$CFG->admin = 'xyz';
$CFG->directorypermissions = 0777;