3.1.6.: Calling my moodlesite via IP-address doesn't work :Fatal error: $CFG->dataroot ..

Re: 3.1.6.: Calling my moodlesite via IP-address doesn't work :Fatal error: $CFG->dataroot ..

by Monica Franz -
Number of replies: 0
I tried to fix this problem with Apache, but get the same fatal error as with htaccess!

The part of Apache SSL conf for the Documentroot call looks like this

<VirtualHost _default_:80>
 ServerName myservername
 Redirect / https://mymoodlewebsite.mydomain/

</VirtualHost>

NameVirtualHost *:443
...

<IfModule mod_ssl.c>
<VirtualHost *:443>
  ...
   
      ServerName myservername

RewriteEngine on
RewriteCond %{REMOTE_ADDR} !^myipaddress
RewriteRule /index.php http://myerrordocument.mydomain
RewriteRule ^myipaddress  https:\/\/myipaddress

DocumentRoot /mymoodledirectory

....

I have no idea what I could do. I tried other conditions (HTTPS, REMOTE_ADDR,HTTP_HOST) as well, with the same result.

How do others use a maintenance page, so the admin can still do her maintenace work on the moodle site  at the same time?

Cheers,
Monica