drlippman / IMathAS

IMathAS Online Math Assessment
Other
112 stars 99 forks source link

Unable to login while using FQDN #306

Closed CUSD4-porterry closed 2 years ago

CUSD4-porterry commented 2 years ago

Hi there, I'm attemtping to spin up an instance of IMathAS as a demo, but am running into trouble when trying to log in while using the Fully Qualifed Domain Name instead of IP. When accessing the site via IP, login works just fine. I attemtpted to use the variable

$CFG['GEN']['domainlevel'] = -3

but that caused the website to break and throw an HTTP ERROR 500. I seem to have the opposite issue of issue #7.

Is there a place that the FQDN needs to be set? I have my hosts file already configured with the domain. The machine is running on ubuntu 20.04.

drlippman commented 2 years ago

No, the domain name doesn't need to be specified anywhere. If you want the cookie set at the sitename.tld level, you'll want the $CFG['GEN']['domainlevel'] set to -2. Use -3 if you want the cookie set at the subdomain.sitename.tld level.

Is your site set up to use https? The cookie the site sets is set to secure only, so the cookie necessary to stay logged in won't get set if you're not using https.

CUSD4-porterry commented 2 years ago

Ah! That solved the issue entirely! Thank you!