Difference between revisions of "MediaWiki"

From Briki
Jump to: navigation, search
(sWmTxuXAFip)
 
(21 intermediate revisions by 20 users not shown)
Line 1: Line 1:
affinity bio http://markraos95.makesgirlscrazy.com/affinity-plus.-com.html affinity plus. comwww.madden07 be my couch.com http://markraos95.makesgirlscrazy.com/biotech-vs.-pharma.html biotech vs. pharmaj.i.t. logistics http://markraos95.makesgirlscrazy.com/affinity-four.com.html affinity four.comcustomerservice affinity 4.com http://markraos95.makesgirlscrazy.com/affinity-copm.html affinity copmaffinity co http://markraos95.makesgirlscrazy.com/hard-disk-manager-8.0.html hard disk manager 8.0ronald d. davis http://markraos95.makesgirlscrazy.com/human-capital-inc.html human capital incaffinity diagram.pdf http://markraos95.makesgirlscrazy.com/www.sawmill-exchange.com.html www.sawmill exchange.comrhardin nos.com affinity network inc http://markraos95.makesgirlscrazy.com/fiscal-four-l.p.html fiscal four l.paffinity group http://markraos95.makesgirlscrazy.com/vacation-hair-loss-go2clickbank.com.html vacation hair loss go2clickbank.comaffinity.com http://markraos95.makesgirlscrazy.com/affinity-exchange.com.html affinity exchange.com
+
== Updating user passwords ==
 +
<pre>
 +
php /var/lib/mediawiki/maintenance/changePassword.php --user=foo --password=foopass
 +
</pre>
 +
 
 +
== Editing Sidebar ==
 +
Simply load [[MediaWiki:Sidebar]] and edit it (must be admin user). For formatting help, see http://meta.wikimedia.org/wiki/Help:Navigation_bar.
 +
 
 +
== Short or v. short URLs (depending on virtual host) ==
 +
* Ensure that /etc/apache2/sites-available/default (and .../ssl if appropriate) include /etc/apache2/conf.default/*
 +
* Move /etc/apache2/conf.d/mediawiki1.10.conf to /etc/apache2/conf.default/mediawiki1.10.conf
 +
* Create /etc/apache/conf.d/mediawiki1.10.conf and add:
 +
<pre>
 +
Alias /wiki /var/lib/mediawiki1.10
 +
 
 +
<Directory /var/lib/mediawiki1.10/>
 +
    # Allow short URLs
 +
    RewriteEngine On
 +
    RewriteBase /wiki
 +
 
 +
    RewriteRule ^[^:]*\.(php|src|jpg|jpeg|png|gif|bmp|css|js|inc|phtml|pl|ico|html|shtml)$ - [L,NC]
 +
    RewriteRule ^index.php?title - [L]
 +
    RewriteRule ^(.*)\&(.*)$ $1\%26$2
 +
    RewriteRule ^(.+)$ index.php?title=$1 [L,QSA]
 +
</Directory>
 +
</pre>
 +
 
 +
* Create /etc/apache2/sites-available/mediawiki and add:
 +
<pre>
 +
<VirtualHost *:80>
 +
    ServerName wiki.bretts.org
 +
    DocumentRoot /var/lib/mediawiki1.10
 +
 
 +
    # Allow short URLs
 +
    RewriteEngine On
 +
 
 +
    RewriteRule ^[^:]*\.(php|src|jpg|jpeg|png|gif|bmp|css|js|inc|phtml|pl|ico|html|shtml)$ - [L,NC]
 +
    RewriteRule ^index.php?title - [L]
 +
    RewriteRule ^(.*)\&(.*)$ $1\%26$2
 +
    RewriteRule ^/?(.*)$ /index.php?title=$1 [L,QSA]
 +
</VirtualHost>
 +
 
 +
<VirtualHost *:443>
 +
    ServerName wiki.bretts.org
 +
    DocumentRoot /var/lib/mediawiki1.10
 +
 
 +
    # Allow short URLs
 +
    RewriteEngine On
 +
 
 +
    RewriteRule ^[^:]*\.(php|src|jpg|jpeg|png|gif|bmp|css|js|inc|phtml|pl|ico|html|shtml)$ - [L,NC]
 +
    RewriteRule ^index.php?title - [L]
 +
    RewriteRule ^(.*)\&(.*)$ $1\%26$2
 +
    RewriteRule ^/?(.*)$ /index.php?title=$1 [L,QSA]
 +
</VirtualHost>
 +
</pre>
 +
 
 +
* Edit /etc/mediawiki1.10/mediawiki.conf and add:
 +
<pre>
 +
if (strpos($_SERVER['SERVER_NAME'], 'wiki') === false) {
 +
    $wgScriptPath      = "/wiki";
 +
    $wgArticlePath      = "/wiki/$1";
 +
} else {
 +
    $wgScriptPath      = "";
 +
    $wgArticlePath      = "/$1";
 +
}
 +
 
 +
## Disable caching, so that we can use alternate URLs for different virtual hosts
 +
$wgEnableParserCache = false;
 +
</pre>
 +
 
 +
* Run '''sudo a2ensite mediawiki'''
 +
 
 +
== Setting site homepage ==
 +
Edit /etc/apache2/sites-available/default and add:
 +
<pre>
 +
RedirectMatch permanent ^/$ /wiki/Main_Page
 +
</pre>

Latest revision as of 10:57, 13 March 2023

Updating user passwords

php /var/lib/mediawiki/maintenance/changePassword.php --user=foo --password=foopass

Editing Sidebar

Simply load MediaWiki:Sidebar and edit it (must be admin user). For formatting help, see http://meta.wikimedia.org/wiki/Help:Navigation_bar.

Short or v. short URLs (depending on virtual host)

  • Ensure that /etc/apache2/sites-available/default (and .../ssl if appropriate) include /etc/apache2/conf.default/*
  • Move /etc/apache2/conf.d/mediawiki1.10.conf to /etc/apache2/conf.default/mediawiki1.10.conf
  • Create /etc/apache/conf.d/mediawiki1.10.conf and add:
Alias /wiki /var/lib/mediawiki1.10

<Directory /var/lib/mediawiki1.10/>
    # Allow short URLs
    RewriteEngine On
    RewriteBase /wiki

    RewriteRule ^[^:]*\.(php|src|jpg|jpeg|png|gif|bmp|css|js|inc|phtml|pl|ico|html|shtml)$ - [L,NC]
    RewriteRule ^index.php?title - [L]
    RewriteRule ^(.*)\&(.*)$ $1\%26$2
    RewriteRule ^(.+)$ index.php?title=$1 [L,QSA]
</Directory>
  • Create /etc/apache2/sites-available/mediawiki and add:
<VirtualHost *:80>
    ServerName wiki.bretts.org
    DocumentRoot /var/lib/mediawiki1.10

    # Allow short URLs
    RewriteEngine On

    RewriteRule ^[^:]*\.(php|src|jpg|jpeg|png|gif|bmp|css|js|inc|phtml|pl|ico|html|shtml)$ - [L,NC]
    RewriteRule ^index.php?title - [L]
    RewriteRule ^(.*)\&(.*)$ $1\%26$2
    RewriteRule ^/?(.*)$ /index.php?title=$1 [L,QSA]
</VirtualHost>

<VirtualHost *:443>
    ServerName wiki.bretts.org
    DocumentRoot /var/lib/mediawiki1.10

    # Allow short URLs
    RewriteEngine On

    RewriteRule ^[^:]*\.(php|src|jpg|jpeg|png|gif|bmp|css|js|inc|phtml|pl|ico|html|shtml)$ - [L,NC]
    RewriteRule ^index.php?title - [L]
    RewriteRule ^(.*)\&(.*)$ $1\%26$2
    RewriteRule ^/?(.*)$ /index.php?title=$1 [L,QSA]
</VirtualHost>
  • Edit /etc/mediawiki1.10/mediawiki.conf and add:
if (strpos($_SERVER['SERVER_NAME'], 'wiki') === false) {
    $wgScriptPath       = "/wiki";
    $wgArticlePath      = "/wiki/$1";
} else {
    $wgScriptPath       = "";
    $wgArticlePath      = "/$1";
}

## Disable caching, so that we can use alternate URLs for different virtual hosts
$wgEnableParserCache = false;
  • Run sudo a2ensite mediawiki

Setting site homepage

Edit /etc/apache2/sites-available/default and add:

RedirectMatch permanent ^/$ /wiki/Main_Page