Ian's picture

I'm setting up a new wiki for my company, but when after users successfully log in, they aren't being redirected to the page they are trying to access and instead are being shown a blank page that only has "Log in" as the title (See attached screenshot).  I've checked the logs and it looks like the response from the log in POST is 200, but I suspect that it should actually be 302.  Has anyone seen this before and know how to fix it?

More information here: https://stackoverflow.com/questions/52323448/mediawiki-wont-redirect-to-...

Forum: 
Tags: 
Jeremy Davis's picture

Thanks for your bug report. When I get a chance, I'll look into your issue and see if I can reproduce it. The good news is that if I can reproduce it, then we should be able to fix it (or at least devise a workaround).

To assist me to reproduce it could you please share which version of TurnKey you are using? If you're not sure, please run:

turnkey-version

Please also provide any info on changes you have made. I see for your post on Stack Exchange that you have set up Let's Encrypt and disabled anonymous access. Did you use Confconsole to enable Let's Encrypt certs? Or did you go a different route? (It probably doesn't matter, but perhaps?)

What (if any) other changes have you made? E.g. updated MediaWiki version? Installed additional plugins/modules?

Jeremy Davis's picture

Ian noted that it's not working as expected in v15.0, but works fine in v14.x.

I opened an issue on the tracker and I think I've worked it out. As noted on the GH issue and also on the StackOverflow post, it appears that the redirects in Mediawiki now rely on the the $wgServer variable being set in LocalSettings.php (located at /var/www/mediawiki/LocalSettings.php) - it's blank by default in v15.0 Mediawiki appliance:

$wgServer = "";
So it needs to be set like this:
$wgServer = "https://www.example.com";

Where https is the scheme you are using (i.e. either http or https) and www.example.com is the full domain you are using.

Add new comment