Attempting to install a moodle 36_STABLE test system on my local machine, I set in my host file 127.0.0.1 to moodle.dev.local then I created an apache2 virtual host with moodle.dev.local as the ServerName and document root to /var/www/moodle
I cloned git in /var/www, creating moodle directory.
The installation went through and it gave me this config.php. I copied and pasted it into config.php and clicked next. Then I get this error
The page isn’t redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
This problem can sometimes be caused by disabling or refusing to accept cookies.
Config.php:
<?php // Moodle configuration file
unset($CFG);
global $CFG;
$CFG = new stdClass();
$CFG->dbtype = 'mariadb';
$CFG->dblibrary = 'native';
$CFG->dbhost = 'localhost';
$CFG->dbname = 'moodle';
$CFG->dbuser = 'moodleuser';
$CFG->dbpass = 'moodlepass';
$CFG->prefix = 'mdl_';
$CFG->dboptions = array (
'dbpersist' => 0,
'dbport' => 3306,
'dbsocket' => '',
'dbcollation' => 'utf8mb4_general_ci',
);
$CFG->wwwroot = 'http://moodle.dev.local';
$CFG->dataroot = '/var/www/moodledata';
$CFG->admin = 'admin';
$CFG->directorypermissions = 0777;
require_once(__DIR__ . '/lib/setup.php');
// There is no php closing tag in this file,
// it is intentional because it prevents trailing whitespace problems!
This makes no sense, why does it try to redirect to itself after it gave me these exact settings in the config.php?
EDIT: Curl gave me this output. It sends a 303 header with an empty location.
* Trying 127.0.0.1...
* TCP_NODELAY set
* Expire in 200 ms for 4 (transfer 0x55bf17fdbdd0)
* Connected to moodle.dev.local (127.0.0.1) port 80 (#0)
> GET /admin/index.php HTTP/1.1
> Host: moodle.dev.local
> User-Agent: curl/7.64.0
> Accept: */*
>
< HTTP/1.1 303 See Other
< Date: Wed, 08 May 2019 08:55:14 GMT
< Server: Apache/2.4.38 (Debian)
< X-Accel-Buffering: no
< Set-Cookie: MoodleSession=41l5jnk2rcq80ff83dmu6cr0st; path=/
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate
< Pragma: no-cache
< Location:
< Content-Language: en
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=utf-8
<
<!DOCTYPE html>
<html lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Redirect</title>
* Connection #0 to host moodle.dev.local left intact
</head><body><div style="margin-top: 3em; margin-left:auto; margin-right:auto; text-align:center;">This page should automatically redirect. If nothing is happening please use the continue link below.<br /><a href="">Continue</a></div></body></html>