Re: user login issue after upgrade to 1.37.2

Toshi Esumi <[email protected]>
Newsgroups gmane.org.wikimedia.mediawiki
Message-ID <[email protected]>
On 5/12/22 04:31, Jeffrey Walton wrote:
>
> I ran into this issue (or a very similar issue) several years ago. Or
> I had the same symptoms. Verify $wgServer matches the server name in
> httpd.conf .
>
> MediaWiki 1.34 changed the default value to '$wgServer = false;' I
> think that's what broke logins for us. Also see
> https://www.mediawiki.org/wiki/Manual:$wgServer .
>
> Here are my notes in LocalSettings.php and httpd.conf:
>
> $ cat LocalSettings.php
> ...
> # Protocol-relative URLs. The server will serve over HTTP or
> #   HTTPS, depending on what the user requested. $wgServer must
> #   match the server name in httpd.conf or login will break
> $wgServer           = '//www.cryptopp.com';
> $wgCanonicalServer  = 'https://www.cryptopp.com';
> $wgSitename         = 'Crypto++ Wiki';
>
> # Security related administrivia
> $wgSecureLogin      = true;
> $wgCookieHttpOnly   = true;
> $wgCookieSecure     = 'detect';
>
> And:
>
> # cat /etc/apache2/sites-enabled/cryptopp.conf
> <VirtualHost *:80>
>          ...
>          ServerName cryptopp.com
>          ServerAlias www.cryptopp.com *.cryptopp.com
>
>          # https://linuxize.com/post/redirect-http-to-https-in-apache/
>          Redirect permanent / https://cryptopp.com/
>          ...
>
> Jeff

Thanks Jeff. It was spot on.

First I didn't know they needed to match and I changed $wgServer side 
only. Also I recently installed a certificate to add SSL support then 
forgot to update to $wgServer = https://...

Now I can log in with my username. I appreciate your help.


Toshi
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.