On Thu, May 12, 2022 at 1:16 AM Toshi Esumi <[email protected]> wrote: > > I successfully upgraded/migrated my old wiki 1.26.0 to a new wiki 1.37.2 > about a month ago. But now I realized I couldn't log in the wiki to edit > content. I was not sure what my old user password was but assuming the > old password was less than 8 chars. So I used changePassword.php to > reset my password and set a new one longer than 8 chars. > > But when I used it to log in my wiki, it seems to accept but goes back > to original page with only "Log in" link on the top right corner, which > means I'm not logged in. I immediately checked LocalSettings.php if > $wgReadOnly was still configured after the upgrade, which was commented > out with the leading '#'. > > What could cause this behavior of the wiki?
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 _______________________________________________ MediaWiki-l mailing list -- [email protected] To unsubscribe send an email to [email protected] https://lists.wikimedia.org/postorius/lists/mediawiki-l.lists.wikimedia.org/
