Wrong redirecting to https://MYSITE/https//MYSITE.COM

I've run certbot on my server which took care of redirecting.
But the redirects is now wrong:
typing: 'https://MYSITE.COM' redirects to 'https://MYSITE.COM/https//MYSITE.COM'

My conf files:
file: /etc/httpd/conf.d/moodle.conf

<Directory /var/www/html/moodle/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/httpd/studyingroup.com-error_log
CustomLog /var/log/httpd/studyingroup.com-access_log common

RewriteEngine on
RewriteCond %{SERVER_NAME} =studyingroup.com [OR]
RewriteCond %{SERVER_NAME} =www.studyingroup.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

file: /var/www/html/moodle/config.php

<?php  // Moodle configuration file

unset($CFG);
global $CFG;
$CFG = new stdClass();

.... REDACTED...

$CFG->wwwroot   = 'https//studyingroup.com';
$CFG->dataroot  = '/var/www/moodledata';
$CFG->admin     = 'admin';

$CFG->directorypermissions = 02777;

require_once(__DIR__ . '/lib/setup.php');

Thank you!

My domain is: https://studyingroup.com

My web server is (include version): httpd

The operating system my web server runs on is (include version): CentOS

My hosting provider, if applicable, is: ec2 Amazon

1 Like

It looks like this line of your Moodle configuration file may be the problem: there's a missing : after https.

6 Likes

lol How stupid of me! Sorry for the trouble...

2 Likes

No worries! We’re here to help, and we’ve all made far worse mistakes.

4 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.