Reverse Proxy Server 2: Wiki

 

Uniform Server 5.0-Nano
Reverse Proxy.

On the previous page I covered running a subversion back-end server this page looks at running MediaWiki as a back-end server.

Again before deployment this can be tested on a local PC.

Note: This page is worth reading before installing on a back-end server.

Preparation

For this example we require a MediaWiki server.

Create a new folder C:\server_d Extract a copy of UniServer 5.0 to this folder.

1) Move Servers First close all running servers.
  1. Run Unitray: C:\server_d\UniServer\Start.exe
  2. Left click tray icon > Advance > Move Servers multi-server operation
  3. Press enter at all prompts
  4. Repeat 2 and 3 Until icon 5 is displayed
  • Note: Apache port = 84
2) Download Mediawiki
  1. Download Mediakiki 1.15.1 (or newer version) from here save to a convenient folder.
  2. Unzip the downloaded file (mediawiki-1.15.1.tar.gz) Windows cannot do this use something like 7-Zip Portable
     --- Download site: PortableApps.com
     --- File name: 7-Zip Portable - Multilingual file archiver and compressor
  3. Extract mediawiki-1.15.1.tar.gz to current path, creates a new folder mediawiki-1.15.1.tar open this folder
  4. Extract mediawiki-1.15.1.tar to current path, creates a new folder mediawiki-1.15.1
3) Copy files to Uniform Server
  1. Copy folder mediawiki-1.15.1 to server root folder C:\server_d\UniServer\www
  2. Rename folder mediawiki-1.15.1 to wiki
4) Install
  1. Start servers
  2. Type the following into your browser address bar: http://localhost:84/wiki/ redirects to installation page.
  3. Click the link Please set up the wiki first.
  4. This opens the configuration page scroll down to Site config and fill in the form.

Top

Site config

Wiki name:MPG (whatever you like)
Contact e-mail:admin@localhost
Language:en-English
Copyright/license: (radio button) select No license metadata
Admin username:WikiSysop
Password:root66 (whatever you like)
Password confirm:root66 (same as above)
Object caching:(radio button) select none
Memcached servers:(leave blank)

E-mail, e-mail notification and authentication setup

E-mail features (global): (radio button) select Disabled
User-to-user e-mail:(radio button) select Disabled
E-mail notification about changes:(radio button) select Disabled
E-mail address: (radio button) select Disabled

Database config

Database type:(radio button) select MySQL
Database host:localhost:3310 - Note port number
Database name: wikidb
DB username:root
DB password confirm: root
Superuser account:tick box
Superuser name:root
Superuser password:root

MySQL specific options

Database table prefix:leave blank
Storage Engine:(radio button) select MyISAM
Database character set: : (radio button) select MySQL 4.1/5.0 binary

Click Install MediaWiki

After creating the database a second page will display, scroll down the page you will see the conformation message

Installation successful! Move the config/LocalSettings.php 
file to the parent directory, then follow this link to your wiki”

Top

Notes

Notes 1: To enable image uploads:

  1. Open file: LocalSettings.php
  2. Located in folder: *\UniServer\udrive\www\wiki
  3. Change this line: $wgEnableUploads = false;
  4. To: $wgEnableUploads = true;


Top

Configure Proxy Server

Remember that template? Well configuring the proxy is just a copy and paste exercise. For this example even the correct port is included.

Edit file C:\server_a\UniServer\usr\local\apache2\conf\httpd.conf

Add the wiki section as shown below:

Include conf/proxy_html.conf
NameVirtualHost *
<VirtualHost *>
  ServerName localhost:80
  DocumentRoot C:/server_a/UniServer/www

ProxyRequests off
<Proxy *>
  Order deny,allow
  Deny from all
  Allow from 127.0.0.1
</Proxy>

ProxyPass /info/ http://localhost:82/
ProxyHTMLURLMap http://localhost:82 /info
<Location /info/>
  ProxyPassReverse  http://localhost:82/
  #SetOutputFilter proxy-html
  SetOutputFilter INFLATE;proxy-html;DEFLATE
  ProxyHTMLURLMap /          /info/
  ProxyHTMLURLMap /info      /info
</Location>

ProxyPass /svn/ http://localhost:83/svn/
<Location /svn/ >
  ProxyPassReverse /svn/
   <LimitExcept GET PROPFIND OPTIONS REPORT>
     Order deny,allow
     Deny from all
   </LimitExcept>
</Location>

ProxyPass         /wiki/  http://localhost:84/wiki/
ProxyHTMLURLMap http://localhost:84/wiki /wiki
<Location /wiki/>
 ProxyPassReverse http://localhost:84/wiki/
 SetOutputFilter INFLATE;proxy-html;DEFLATE
 ProxyHTMLURLMap /           /wiki/
 ProxyHTMLURLMap /wiki       /wiki
</Location>

</VirtualHost>

Top

Test Configuration

To quickly check the configuration:

  • Start server_a
  • Start server_d
  • Type http://localhost/wiki/

Result: Wiki main page displayed.

Create a new Wiki page, confirm you can save and display the new page.

Top

Summary

That completes how to proxy a MediaWiki back-end server.

On the next page I look at an Intranet deployment.

Top


  Ric