]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blob - doc/tips/psgi.mdwn
Untested backport to Ubuntu trusty.
[git.ikiwiki.info.git] / doc / tips / psgi.mdwn
1 [[!meta date="2010-12-12 07:33:25 +0000"]]
3 Here's the app.psgi file if you want to run ikiwiki with [PSGI](http://plackperl.org) instead of apache or other web servers:
5     use Plack::App::CGIBin;
6     use Plack::Builder;
7     use Plack::App::File;
8     
9     builder {
10         mount '/ikiwiki.cgi' => Plack::App::CGIBin->new(file => './ikiwiki.cgi')->to_app;
11         enable "Plack::Middleware::Static",
12             path => sub { s!(^(?:/[^.]*)?/?$)!${1}/index.html! },
13                 root => '.';
14         mount '/' => Plack::App::File->new(root => ".")->to_app;
15     };
17 Put it in your destdir and now your can run `plackup -p <port>`.
19 Note that you should configure your `url` and `cgiurl` to point to the listening address of plackup.
21 Also, the app.psgi residing in the destdir means that /app.psgi is accessible from the web server.
23 Hopefully some day ikiwiki web ui will speak psgi natively.