By default, Instiki runs on Port 2500. For many purposes, it’s nice to be able to dispense with the “:2500” appended to the hostname in all of your URLs. That means running on Port 80.
Far-and-away the best solution for running on Port 80 is to run Instiki under Passenger. Passenger is easy to install, and most Rails-friendly hosting services have already done so. Under Passenger 5.0.x, you need to be running 5.0.7 or later. Earlier version of Passenger 5 had troubles with Instiki.
The one caveat is that running under Passenger will require you to migrate your database to MySQL. The default SQLite3 database is not really designed for multiple Instiki processes (as happens, when you run under Passenger) accessing the database simultaneously.
This site is running on Passenger 6.1.2 (and Ruby 3.2). The configuration consisted of adding
LoadModule passenger_module /usr/local/lib/ruby/gems/3.2.0/gems/passenger-6.1.2/buildout/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/3.2.0/gems/passenger-6.1.2
PassengerDataBufferDir /tmp
PassengerInstanceRegistryDir /tmp
PassengerLogFile /var/log/passenger.log
PassengerDefaultRuby /usr/local/bin/ruby32
PassengerUserSwitching on
PassengerMinInstances 2
PassengerMaxInstancesPerApp 6
PassengerMaxPoolSize 12
PassengerPreStart https://golem.ph.utexas.edu/wiki/web_list
to the httpd.conf file and, to enable X-Sendfile support,
<Location /wiki>
<IfModule mod_xsendfile.c>
RequestHeader Set X-Sendfile-Type X-Sendfile
XSendFile on
XSendFilePath /path/to/wiki/webs
XSendFilePath /path/to/wiki/storage
</IfModule>
PassengerAllowEncodedSlashes on
</Location>
The “PassengerAllowEncodedSlashes on” allows one to use characters like ‘+’ in page names, just as one is able to do using Thin. It’s not fully compatible with Apache’s mod_rewrite, so you may not want to turn it on globally. The Apache directive, “AllowEncodedSlashes On” is more aptly-named. It (when accompanied by “PassengerAllowEncodedSlashes on”) allows you to also use “/” in page names.
The latter set of directives can be sent in the httpd.conf file (as I did), or in Instiki’s public/.htaccess file, if Apache’s
AllowOverride Options
is set for this location.
The next most flexible solution is to Proxy via Apache, nginx or lighttpd. You only get one backend Instiki process this way (so it’s OK to keep using SQLite3).