WowbaggerServiceWiki

From Slaskete wiki
Jump to: navigation, search

Installerte mediawiki:

sudo aptitude install mediawiki

Konfigurerte /etc/mediawiki/apache.conf for å få det inn på riktig subdomene:

<VirtualHost *:80>
ServerName wiki.slaskete.net
ServerAlias *.wiki.slaskete.net
ServerAdmin webmaster+wowbagger@slaskete.net

DocumentRoot /var/lib/mediawiki

<Directory /var/lib/mediawiki/>
        Options +FollowSymLinks -Indexes
        AllowOverride All
        order allow,deny
        allow from all
</Directory>

# some directories must be protected
<Directory /var/lib/mediawiki/config>
        Options -FollowSymLinks
        AllowOverride None
</Directory>
<Directory /var/lib/mediawiki/upload>
        Options -FollowSymLinks
        AllowOverride None
</Directory>
</VirtualHost>

Restartet Apache.

Opprettet db og db-bruker på MySQL. Kjørte webbasert installasjon.

Flyttet configfilen til /etc/mediawiki/ og satte permissions:

sudo mv /var/lib/mediawiki/config/LocalSettings.php /etc/mediawiki/
sudo chgrp www-data /etc/mediawiki/LocalSettings.php
sudo chmod o= /etc/mediawiki/LocalSettings.php

La til følgende i /etc/mediawiki/apache.conf:

Alias /wiki /var/lib/mediawiki/index.php
Alias /index.php /var/lib/mediawiki/index.php
Alias /skins /var/lib/mediawiki/skins
Alias /images /var/lib/mediawiki/images

La til følgende linjer i /etc/mediawiki/LocalSettings.conf:

$wgArticlePath       = "/$1";
$wgUsePathInfo       = false;

Og dette i /var/lib/mediawiki/.htaccess:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.+) /wiki/index.php?title=$1 [L,QSA]