Moodle 2.8.2 on ISPConfig after end configuration give ERR_TOO_MANY_REDIRECTS

Discussion in 'Installation/Configuration' started by Luis Urbina, Jan 13, 2015.

  1. Luis Urbina

    Luis Urbina New Member

    Hi everyone
    I write to request your help, I am installing moodle 2.8.2 on ISPConfig 3 in a VPS-server and follow this steps:
    1) obviously I installed ISPconfig 3 and created a client (my self), created a site (my site), created my DB and DBuser in my VPS with all services.
    2) I downloaded Moodle by Git clone with all steps to do it, follow a chmod and chown steps to finally install moodle.
    3) After give a paths to install, DB name, DBUser and the finally check, the installation finished asking me my moodle admin user, password, and all data to acomplish the installation, is in this step after show me my moodle campus when is giving me the error "The website: http://XXXXXXX.Net/campus/admin/index.php?sessionstarted=1&lang=es_ve has produced too many redirects . Perhaps the problem is resolved by deleting the cookies for this site or allowing third-party cookies . If that does not work, the problem may be related to a bug in the server configuration , not the computer. (Error Code: ERR_TOO_MANY_REDIRECTS)"
    Do you can give me any idea???
    Thanks
     
  2. Luis Urbina

    Luis Urbina New Member

    Hi, follow the indications of Till, I provide the information of htf_report.txt

    [email protected]:~# cat htf_report.txt | more

    ##### SERVER #####
    IP-address (as per hostname): ***.***.***.***
    [WARN] could not determine server's ip address by ifconfig
    [INFO] ISPConfig is installed.

    ##### ISPCONFIG #####
    ISPConfig version is 3.0.5.4p5


    ##### VERSION CHECK #####

    [INFO] php (cli) version is 5.5.9-1ubuntu4.5

    ##### PORT CHECK #####

    [WARN] Port 8080 (ISPConfig) seems NOT to be listening

    ##### MAIL SERVER CHECK #####


    ##### RUNNING SERVER PROCESSES #####

    [INFO] I found the following web server(s):
    Apache 2 (PID 10789)
    [INFO] I found the following mail server(s):
    Postfix (PID 1544)
    [INFO] I found the following pop3 server(s):
    Dovecot (PID 497)
    [INFO] I found the following imap server(s):
    Dovecot (PID 497)
    [INFO] I found the following ftp server(s):
    PureFTP (PID 1584)

    ##### LISTENING PORTS #####
    (only ()
    Local (Address)
    [anywhere]:21 (1584/pure-ftpd)
    ***.***.***.***:53 (616/named)
    ***.***.***.***:53 (616/named)
    [localhost]:53 (616/named)
    [anywhere]:22 (495/sshd)
    [anywhere]:25 (1544/master)
    [localhost]:953 (616/named)
    [anywhere]:443 (10789/apache2)
    [anywhere]:993 (497/dovecot)
    [anywhere]:2083 (10789/apache2)
    [anywhere]:995 (497/dovecot)
    [localhost]:10025 (1544/master)
    [localhost]:3306 (558/mysqld)
    [anywhere]:587 (1544/master)
    [localhost]:11211 (1430/memcached)
    [anywhere]:110 (497/dovecot)
    [anywhere]:143 (497/dovecot)
    [anywhere]:80 (10789/apache2)
    [anywhere]:8081 (10789/apache2)
    [anywhere]:465 (1544/master)
    *:*:*:*::*:21 (1584/pure-ftpd)
    *:*:*:*::*:53 (616/named)
    *:*:*:*::*:22 (495/sshd)
    *:*:*:*::*:25 (1544/master)
    *:*:*:*::*:953 (616/named)
    *:*:*:*::*:993 (497/dovecot)
    *:*:*:*::*:995 (497/dovecot)
    *:*:*:*::*:587 (1544/master)
    [localhost]10 (497/dovecot)
    [localhost]43 (497/dovecot)
    *:*:*:*::*:465 (1544/master)




    ##### IPTABLES #####
    Chain INPUT (policy ACCEPT)
    target prot opt source destination
    fail2ban-postfix-sasl tcp -- [anywhere]/0 [anywhere]/0
    multiport dports 25
    fail2ban-dovecot-pop3imap tcp -- [anywhere]/0 [anywhere]/0
    multiport dports 110,995,143,993
    fail2ban-pureftpd tcp -- [anywhere]/0 [anywhere]/0 mult
    iport dports 21
    fail2ban-ssh tcp -- [anywhere]/0 [anywhere]/0 multiport
    dports 22

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination

    Chain fail2ban-dovecot-pop3imap (1 references)
    target prot opt source destination
    RETURN all -- [anywhere]/0 [anywhere]/0

    Chain fail2ban-postfix-sasl (1 references)
    target prot opt source destination
    RETURN all -- [anywhere]/0 [anywhere]/0

    Chain fail2ban-pureftpd (1 references)
    target prot opt source destination
    RETURN all -- [anywhere]/0 [anywhere]/0

    Chain fail2ban-ssh (1 references)
    target prot opt source destination
    RETURN all -- [anywhere]/0 [anywhere]/0

    Server: VPS running Ubuntu Server 14 (latest) LTS
    Please help, Thanks
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    Which errors do you get in the error.log of the website?
     
  4. Luis Urbina

    Luis Urbina New Member

    Till, here a Apache error.log

    ****** BEGIN THE ERROR LOG FILE ******
    [email protected]:/var/log/apache2# tail /var/log/apache2/error.log
    Cannot adopt OID in NET-SNMP-AGENT-MIB: nsNotifyShutdown ::= { netSnmpNotifications 2 }
    Cannot adopt OID in NET-SNMP-AGENT-MIB: nsNotifyRestart ::= { netSnmpNotifications 3 }
    Cannot adopt OID in UCD-SNMP-MIB: laErrMessage ::= { laEntry 101 }
    Cannot adopt OID in UCD-SNMP-MIB: laErrorFlag ::= { laEntry 100 }
    Cannot adopt OID in UCD-SNMP-MIB: laLoadFloat ::= { laEntry 6 }
    Cannot adopt OID in UCD-SNMP-MIB: laLoadInt ::= { laEntry 5 }
    Cannot adopt OID in UCD-SNMP-MIB: laConfig ::= { laEntry 4 }
    Cannot adopt OID in UCD-SNMP-MIB: laLoad ::= { laEntry 3 }
    Cannot adopt OID in UCD-SNMP-MIB: laNames ::= { laEntry 2 }
    Cannot adopt OID in UCD-SNMP-MIB: laIndex ::= { laEntry 1 }
    [email protected]:/var/log/apache2#
    ****** END ERROR LOG FILE ******

    This is a clean install of Moodle 2.8.2 , I configured the initial parameters, the database and passed the initial screening and created the admin user, then it shows the site is where I get the error ERR_TOO_MANY_REDIRECTS.

    Thanks
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    This is the global apache error.log. Please take a look at the error.log of the website, you find it in the log folder of the affected website.
     
  6. asemyc

    asemyc New Member

    Hello Luis, you can solve:
    Open up /moodle/admin/index.php in a text editor, find and comment out the following,
    redirect("index.php?sessionstarted=1&lang=$CFG->lang");
    So that it looks like:
    //redirect("index.php?sessionstarted=1&lang=$CFG->lang");

    ****** but then you will receive many errors such as:
    Notice
    : Undefined property: stdClass::$frontpage in /var/www/clients/client1/web5/web/index.php on line 171
    ***** Really, I don't know, What happens between Moodle and ISPConfig, any help is appreciated.
    Greetings.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats not related to ispconfig at all, ispconfig is not interacting with moodle. I installed several moodle installs for customers aalready, they always worked out of the box. maybe you added some rewrite rules in the website that redirect the moodle url's.
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats just the php snmp extension, not related to your problem, install php5-snmp and the error is gone.

    Most likely you setup some kind of redirect in ispconfig or the .htaccess file in the website. such an error occurs e.g. when you set moole to use the url domain.com and then setup a redirect in ispconfig for domain.com to www.domain.com, so apache redirects to www subdomain and moodile back to non www subdomain.
     

Share This Page