Jump to content

Manual talk:Running MediaWiki on Debian or Ubuntu

About this board

This board is for discussions about running MediaWiki on Debian or Ubuntu.

Older discussion can be found at Manual talk:Running MediaWiki on Ubuntu

Scibearspace (talkcontribs)

Dear All.


TLDR


In the see also section of this page there is a link : Mediawiki Setup Guide at ofswiki.org That doesn't take me to the page that is linked to, it auto redirects to a page where the site can be registered.

I haven't yet found a good alternative to this link, so I've left it on the page. I have put an HTML comment before the bullet point line that contains the link. I have signed this page with my 'SBS' tag.


SBS

Reply to "Page Errors"

Short URL/Apache for Ubuntu 20.10

1
Gstratt (talkcontribs)

Because I am an *absolute* noob when it comes to both apache and Ubuntu, it took me a while to get Short/Pretty URLs working in Apache on Ubuntu 20.10. The settings below are an expansion to Manual:Running MediaWiki on Debian or Ubuntu#Pretty URLs

Update LocalSettings.php

  1. $wgScriptPath = "/mediawiki";
  2. $wgArticlePath = "/wiki/$1";
  3. $wgUsePathInfo = true;

Add URL Rewrites to Apache

The Debian (Ubuntu) Apache package splits all the configuration files into various folders. Rather than adding the rewrite rules directly into the default Virtual Hosts .conf file, I created a separate .conf and linked the two with an Include. I'm not sure this is *exactly* how Debian intends this to be configured, but it did work.

  1. Enable apache's url rewrite module
    1. sudo a2enmod rewrite
  2. Create a configuration file to include the URL rewrite rules
    1. Create /etc/apache2/conf-available/mediawiki.conf
    2. Add the following contents:
      1. RewriteEngine On
      2. RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/mediawiki/index.php [L]
      3. RewriteRule ^/*$ %{DOCUMENT_ROOT}/mediawiki/index.php [L]
  3. Enable that configuration file
    1. Command sudo a2enconf /etc/apache2/conf-available/mediawiki.conf
  4. Set my default VirtualHosts configuration file to import the mediawiki.conf contents
    1. Edit /etc/apache2/sites-available/000-default.conf
    2. Add 1 line just before </VirtualHost>: Include conf-enabled/mediawiki.conf
  5. Restart apache
    1. systemctl restart apache2
Reply to "Short URL/Apache for Ubuntu 20.10"

mediawiki 1.35.1 plus visualeditor, public or private: Error contacting the Parsoid/RESTBase server: (curl error: 60) SSL peer certificate or SSH remote key was not OK

3
Smartdaddy1879 (talkcontribs)

hello mediawiki experts,

thanks for all the work, a lot of things had been done since I set up a mediawiki last time (about 8 years ago).


I now did a fresh installation on a recent debian 10 installation using the official 1.35.1-tarball following the manual Running MediaWiki on Debian or Ubuntu

The only extension I added was VisualEditor.

The only thing I changed in LocaleSettings.php was to set $wgServer with my servers address.

and optionally the additional line: $wgGroupPermissions['user']['writeapi'] = true;


To my understanding this way I should end up with a public wiki ready for use incl VisualEditor. (correct?)

I tried both without logging in and as a registered user (I will need some privacy later on, but for now I'd be happy to see VisualEditor working one way or another).


Actually I run such installations quite some times, always starting from scratch, following various other descriptions suggesting to add parsoid and rest server stuff separately.


But whenever I finally start using that editor by clicking on bearbeiten I get the pop up message (using firefox from remote or locally): Error contacting the Parsoid/RESTBase server: (curl error: 60) SSL peer certificate or SSH remote key was not OK


In contrast Quelltest bearbeiten seems to work fine :)


My questions:

  • can I take it for granted the documented procedure should work including VisualEditor without any extra steps ?
  • If any additional procedure is needed: which one ?


thanks for any advise or explanation

Smartdaddy1879 (talkcontribs)

additional info:

turning on all debug stuff I found I got these lines:

 [http] GET: https://<my-server-ip>/mediawiki/rest.php/<my-server-ip>/v3/page/html/Hauptseite/1?redirect=false&stash=true
  
 
  [http] Error fetching URL "https://<my-server-ip>/mediawiki/rest.php/<my-server-ip>/v3/page/html/Hauptseite/1?redirect=false&stash=true": (curl error: 60) SSL peer certificate or SSH remote key was not OK

Maybe somebody could tell the structure of that https request where the original request from outside was

 https://<my-server-ip>/mediawiki/index.php/Hauptseite?action=edit&veswitched=1
Tderouin (talkcontribs)

Hey there - I had this issue this morning myself. It's trying to request https but I don't have SSL running yet on this server. Are you running SSL? Try changing

https://<my-server-ip>/

to http://<my-server-ip>/

Reply to "mediawiki 1.35.1 plus visualeditor, public or private: Error contacting the Parsoid/RESTBase server: (curl error: 60) SSL peer certificate or SSH remote key was not OK"

Upgrading the OS (and PHP) of an existing MW-Installation

3
80.128.153.139 (talkcontribs)

Well, this is a silly question (sorry) but what happens if I make an upgrade from one Ubuntu LTS to another (in my case 18.04 to 20.04) plus a PHP upgrade?

I made a backup of my database and the MediaWiki folder and secured it, but how will the software react to this changes? Do I need a reconfiguration after that? Does I get an error due to the changed OS/PHP version? Or will nothing at all happen?


It is a very silly question, but hey, better asking it now than after having a problem with the upgrade.

Legoktm (talkcontribs)

You should review Compatibility#Server software to make sure the versions you're upgrading to are compatible with your targeted MediaWiki version. In general I recommend upgrading your operating system (and PHP and MySQL, etc.) and then updating MediaWiki if necessary.

In general you shouldn't need to change any MediaWiki configuration. I would recommend ensuring any caches like memcached or redis are reset though.

87.157.185.35 (talkcontribs)

The Ubuntu and PHP upgrade (from 7.2.x to 7.3.x) is more or less the preparation for an upcoming MediaWiki upgrade, so this was the plan all along. Thanks for your help.

Reply to "Upgrading the OS (and PHP) of an existing MW-Installation"

Mediawiki 1.34 doesn't find Localsettings.php on Windows -Ubuntu

1
Summary by EFFemeer

Take good care of uppercase / lowercase:

Localsettings.php is not accepted, it should read LocalSettings.php

EFFemeer (talkcontribs)

I'm trying to install Mediawiki 1.34 via tarball on Windows10 -Linux Ubuntu - apparently all the modules are working fine: phpmyadmin, sql database, apache2. http://localhost/mediawiki/Mw-config ran successfully and produced a valid Localsettings.php: Upgrade complete. You can now start using your wiki. But then MediaWiki 1.34.0 LocalSettings.php not found. Please complete the installation and download LocalSettings.php.

I tried to put the mediawiki directory in /var/www/html/ and alternatively in /var/lib/ with a symbolic link to /var/www/html/ but http://localhost/mediawiki keeps telling me : LocalSettings.php not found.

I've put LocalSettings.php in all the directories one can imagine without success. There are lots of suggestions on several sites but nothing works.


I have tried to debug index.php: wfEntryPointCheck() fails

MavropaliasG (talkcontribs)

On a fresh Ubuntu 19.10, running mysql ver 8.0.18 and php 7.3.11 I followed this guide to install MW 1.34 and I kept getting the error that the mw couldn't find the login/password in the database (i.e. 'the server requested authentication method unknown to the client' etc).

What solved my problem is this article

https://support.scriptcase.net/en-us/article/1252-creating-a-new-mysql-user-and-fixing-the-error-the-server-requested-authentication-method-unknown-to-the-client

and specifically, I had to run the 'Command to create the new user with the old authentication'

Please review the guide and update whatever is needed, I saw some other users had similar problems e.g. Topic:V36q7ftqbs8a117v

Reply to "Update MySQL guide."
Spineflu (talkcontribs)

Assuming we followed the instructions, should the wiki installation be available any time apache2 is running? or is there some other process we need to start?

Reply to "how to restart wiki?"

Why use super user account

1
35.235.65.76 (talkcontribs)

1, The installation says we must use debian-sys-maint, Why must? The installation guide give us the not choice, it seems 'not must'.

2, I am using 'mysql-community-server', 5.7.24-1ubuntu18.04 . which doesn't have debian-sys-maint reserved user.

3, Is 'mysql-community-server', 5.7.24-1ubuntu18.04 mysql.sys is equvilent to debian-sys-maint ?

4. where is the password of debian-sys-maint or mysql.sys ? In my case, it is not the same as root

Reply to "Why use super user account"
76.30.246.206 (talkcontribs)

How to proceed with the section "Configure MediaWiki" in command line only Unix systems where there is no browser access?

76.30.246.206 (talkcontribs)

I could not locate LocalSettings.php in my Mediawiki folder. Is there a way to install Mediawiki from command line instead of we based installation?

Legoktm (talkcontribs)

You should use the maintenance/install.php script.

76.30.246.206 (talkcontribs)

Thanks for your reply. I have used port forwarding to use web installer from my laptop and installed it.

Now I am getting 301 moved permanently error and 500 internal server error.

From my laptop I logged in with the node in which I want to install Mediawiki as below:

ssh -C -L 9999:localhost:80 s7

Then I opened the browser from my laptop as http://s7:9999/mediawiki and installed the mediawiki.

After I tried to ssh with s7 as usual and if I try to access with wget I got the following error:

HTTP request sent, awaiting response... 301 Moved Permanently

Location: http://s7:9999/mediawiki/index.php/Main_Page [following]

--2018-06-14 16:57:31--  http://s7:9999/mediawiki/index.php/Main_Page

Resolving s7 (s7)... 10.10.2.8

Connecting to s7 (s7)|10.10.2.8|:9999... failed: Connection refused.

Then I changed

$wgServer = "http://s7:9999"; to

$wgServer = "http://localhost";

in LocalSettings.php. But still I am getting the same error.

wget http://localhost/mediawiki

--2018-06-14 17:01:33--  http://localhost/mediawiki

Resolving localhost (localhost)... 127.0.0.1

Connecting to localhost (localhost)|127.0.0.1|:80... connected.

HTTP request sent, awaiting response... 301 Moved Permanently

Location: http://localhost/mediawiki/ [following]

--2018-06-14 17:01:33--  http://localhost/mediawiki/

Reusing existing connection to localhost:80.

HTTP request sent, awaiting response... 301 Moved Permanently

Location: http://localhost/mediawiki/index.php/Main_Page [following]

--2018-06-14 17:01:33--  http://localhost/mediawiki/index.php/Main_Page

Reusing existing connection to localhost:80.

HTTP request sent, awaiting response... 500 Internal Server Error

I would like to know how to solve this error. I would like to appreciate any help.

76.30.246.206 (talkcontribs)

I am messed up with apache2 configuration I guess. Can any one please tell me how to configure apache2.conf and 000-deafult.conf and what should be given to $wgScriptPath in LocalSettings.php?

Reply to "Configure MediaWiki"

pi_wiki should not be my_wiki

1
189.146.78.196 (talkcontribs)

Not being an expert runnig configuration script has not worked until i have change pi_wiki by my_wiki

Reply to "pi_wiki should not be my_wiki"