Editing MediaWiki Debian Installation

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
 
=== My Experience Installing MediaWiki 1.31 on Debian/GNU Linux Bullseye (Buster) ===
 
<seo title="MediaWiki Debian Installation" metak="Buster,Bullseye,Url,Firewall,SSL,letsencryt" metad="Challenges installing Mediawiki on Debian" google-site-verification="google00ccddbcda3bce82.html" />
 
 
== My Experience Installing MediaWiki 1.31 on Debian/GNU Linux Bullseye (Buster) ==
 
 
February 2020
 
February 2020
   
Line 16: Line 13:
 
</syntaxhighlight>
 
</syntaxhighlight>
   
=== Firewall ===
+
==== Firewall ====
 
Between my homemachine or an outside visitor and the targetserver is the firewall, built into my router. So I have to allow port sharing with my target server. Debian's default for ssh is port 22. (For further serving http, https and parsoid and mathoid extensions I also allowed ports 80, 443, 8143 and 10043 each for IPv4 and IPv6 to be shared.)
 
Between my homemachine or an outside visitor and the targetserver is the firewall, built into my router. So I have to allow port sharing with my target server. Debian's default for ssh is port 22. (For further serving http, https and parsoid and mathoid extensions I also allowed ports 80, 443, 8143 and 10043 each for IPv4 and IPv6 to be shared.)
   
=== Debian on targetserver ===
+
==== Debian on targetserver ====
 
[https://fit-iot.com/web/products/fitlet2/fitlet2-specifications/ fitlet2] comes with LinuxMint preinstalled, but I prefer Debian. The choice of a desktop environment and an Internet server on the targetserver allow remote browsing via ssh. [https://wiki.debian.org/WebServers Debian recommends]<syntaxhighlight lang="shell">
 
[https://fit-iot.com/web/products/fitlet2/fitlet2-specifications/ fitlet2] comes with LinuxMint preinstalled, but I prefer Debian. The choice of a desktop environment and an Internet server on the targetserver allow remote browsing via ssh. [https://wiki.debian.org/WebServers Debian recommends]<syntaxhighlight lang="shell">
 
sudo tasksel
 
sudo tasksel
Line 28: Line 25:
 
</syntaxhighlight>installs, as I recall, all that is needed to run mediawiki on localhost.
 
</syntaxhighlight>installs, as I recall, all that is needed to run mediawiki on localhost.
   
=== Short URLs ===
+
==== Short URLs ====
 
Short story: place two aliases into the apache2 conf-file that defines the mediawiki host and define the $wgArticlePath:<syntaxhighlight lang="text">
 
Short story: place two aliases into the apache2 conf-file that defines the mediawiki host and define the $wgArticlePath:<syntaxhighlight lang="text">
 
/etc/apache2/conf-enabled/mediawiki.conf:
 
/etc/apache2/conf-enabled/mediawiki.conf:
Line 40: Line 37:
 
</syntaxhighlight>Longer story: to get this right one has to know or guess how apache2 loads its modules, whether there is cumulation or overriding and in what order apache2 loads the modules etc. And also what the Debian defaults are. As I played too long with the configuration files, I can't tell anymore what the original state was. I suppose that /etc/mediawiki/mediawiki.conf was a link to /etc/apache2/conf-enabled/mediawiki.conf and that the above aliases could have been added there.
 
</syntaxhighlight>Longer story: to get this right one has to know or guess how apache2 loads its modules, whether there is cumulation or overriding and in what order apache2 loads the modules etc. And also what the Debian defaults are. As I played too long with the configuration files, I can't tell anymore what the original state was. I suppose that /etc/mediawiki/mediawiki.conf was a link to /etc/apache2/conf-enabled/mediawiki.conf and that the above aliases could have been added there.
   
=== SSL Virtual Default Host ===
+
==== SSL Virtual Default Host ====
I used [https://letsencrypt.org/getting-started/ Let's Encrypt], respectively [https://certbot.eff.org/instructions Certbot], to get a certifcate for my site and had certbot change my configuration files in /etc/apache2.
+
I used [https://letsencrypt.org/getting-started/ Let's Encrypt], respectively [https://certbot.eff.org/instructions Certbot], to get a certifcate for my site and had certbot change my configuration files in /etc/apache2. Testing with testssl showed vulnerabilities, i.e. TLSv1 and TLSv1.1 as accepted protocols.<syntaxhighlight lang="shell">
 
sudo apt install certbot testssl.sh
 
(April 2020: see installation instructions for [https://certbot.eff.org/lets-encrypt/debiantesting-apache.html Debian testing].)
 
 
Testing with testssl showed vulnerabilities, i.e. TLSv1 and TLSv1.1 as accepted protocols.<syntaxhighlight lang="shell">
 
sudo apt install certbot python3-certbot-apache testssl.sh
 
   
 
testssl www.example.com
 
testssl www.example.com
Line 64: Line 57:
 
ServerName www.example.com
 
ServerName www.example.com
   
# ServerAlias
+
# ServerAlias does not work for me
ServerAlias example.com *.example.com
+
#ServerAlias example.com *.example.com
   
 
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
 
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
Line 107: Line 100:
 
</syntaxhighlight>testssl www.example.com now runs flawlessly, warning only about two or three cyphers that should not be offered.
 
</syntaxhighlight>testssl www.example.com now runs flawlessly, warning only about two or three cyphers that should not be offered.
   
=== Math extension, including Parsoid and Mathoid ===
+
==== Math extension, including Parsoid and Mathoid ====
 
I added the Extension:Math in the beginning of February 2020. Additionally, I added Parsoid and Mathoid, not being really sure whether this was needed. In any case, on the Parsoid site it is stated:<blockquote>Parsoid (the PHP version) is planned to come natively bundled with MediaWiki by June 2020. At that time, the setup instructions on this page will be updated. Until then, for non-Wikimedia installations, Parsoid/JS is the supported version of Parsoid. </blockquote>Parsoid and Mathoid are now services on my host. To access them via ports 8143 and 10043, respectively, I installed stunnel4<syntaxhighlight lang="shell">
 
I added the Extension:Math in the beginning of February 2020. Additionally, I added Parsoid and Mathoid, not being really sure whether this was needed. In any case, on the Parsoid site it is stated:<blockquote>Parsoid (the PHP version) is planned to come natively bundled with MediaWiki by June 2020. At that time, the setup instructions on this page will be updated. Until then, for non-Wikimedia installations, Parsoid/JS is the supported version of Parsoid. </blockquote>Parsoid and Mathoid are now services on my host. To access them via ports 8143 and 10043, respectively, I installed stunnel4<syntaxhighlight lang="shell">
 
sudo apt install stunnel4
 
sudo apt install stunnel4

Please note that all contributions to HPWWiki are considered to be released under the GNU Free Documentation Licence 1.3 or later (see HPWWiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)