Instiki
Proxying

While it’s terribly convenient that Instiki comes with its own built-in webserver, there are some drawbacks:

  • Perhaps your organization has firewalled Port 2500.
  • Perhaps you simply want a “cleaner” URL for your Wiki, without the port number included.

Whatever the reason, the easiest “step up” from a vanilla Instiki installation is to set up Apache to proxy for Instiki. This website used to run this way. Now, we run Passenger, which has a number of advantages.

Below are the configuration directives to set up proxying.

In your httpd.conf file, enable proxying

 <IfModule mod_proxy.c>
  ProxyRequests Off
  <Proxy *>
    Require all granted
  </Proxy>
 </IfModule>

If you’re able, install the Apache 2.x x-sendfile module.

Then, for each wiki you want to proxy (e.g., this one):

 <Location /instiki>
   Require all granted
   ProxyPass  http://127.0.0.1:2500/instiki
   ProxyPassReverse  http://golem.ph.utexas.edu:2500/instiki
   ProxyPassReverseCookieDomain golem.ph.utexas.edu golem.ph.utexas.edu
   ProxyPassReverseCookiePath / /instiki/ 
   <IfModule mod_xsendfile.c>
     RequestHeader Set X-Sendfile-Type X-Sendfile
     XSendFile on
     XSendFileAllowAbove on
   </IfModule>
</Location>

In addition, you need to proxy the following directories (common to all your Wikis):

 <Location /stylesheets>
   Require all granted
   ProxyPass  http://127.0.0.1:2500/stylesheets
   ProxyPassReverse  http://golem.ph.utexas.edu:2500/stylesheets
 </Location>

 <Location /s5>
   Require all granted
   ProxyPass  http://127.0.0.1:2500/s5
   ProxyPassReverse  http://golem.ph.utexas.edu:2500/s5
 </Location>

 <Location /javascripts>
   Require all granted
   ProxyPass  http://127.0.0.1:2500/javascripts
   ProxyPassReverse  http://golem.ph.utexas.edu:2500/javascripts
</Location>

<Location /create_web>
  Require all granted
  ProxyPass  http://127.0.0.1:2500/create_web
  ProxyPassReverse  http://golem.ph.utexas.edu:2500/create_web
  ProxyPassReverseCookieDomain golem.ph.utexas.edu golem.ph.utexas.edu
</Location>

<Location /svg-edit>
  Require all granted
  ProxyPass  http://127.0.0.1:2500/svg-edit
  ProxyPassReverse  http://golem.ph.utexas.edu:2500/svg-edit
</Location>

Please note that these instructions were for Apache 2.3.x. For Apache 2.2.x and earlier, replace the lines

 Require all granted

with

 Order Allow,Deny
 Allow from all