aboutsummaryrefslogtreecommitdiff
path: root/doc/tips/psgi.mdwn
diff options
context:
space:
mode:
authorhttp://clkao.org/ <clkao@web>2010-12-12 07:33:25 +0000
committerJoey Hess <joey@kitenet.net>2010-12-12 07:33:25 +0000
commit9a6ddcd5aff22e95115fb86d74184241538d1ad6 (patch)
treed5491bdf029a65aef044e49caa1b71110077e2d9 /doc/tips/psgi.mdwn
parent338a04190f5af2b5e77730d19c570b5fae60066d (diff)
downloadikiwiki-9a6ddcd5aff22e95115fb86d74184241538d1ad6.tar
ikiwiki-9a6ddcd5aff22e95115fb86d74184241538d1ad6.tar.gz
Diffstat (limited to 'doc/tips/psgi.mdwn')
-rw-r--r--doc/tips/psgi.mdwn21
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/tips/psgi.mdwn b/doc/tips/psgi.mdwn
new file mode 100644
index 000000000..0d2eeefc8
--- /dev/null
+++ b/doc/tips/psgi.mdwn
@@ -0,0 +1,21 @@
+Here's the app.psgi file if you want to run ikiwiki with [PSGI](http://plackperl.org) instead of apache or other web servers:
+
+ use Plack::App::CGIBin;
+ use Plack::Builder;
+ use Plack::App::File;
+
+ builder {
+ mount '/ikiwiki.cgi' => Plack::App::CGIBin->new(file => './ikiwiki.cgi')->to_app;
+ enable "Plack::Middleware::Static",
+ path => sub { s!(^(?:/[^.]*)?/?$)!${1}/index.html! },
+ root => '.';
+ mount '/' => Plack::App::File->new(root => ".")->to_app;
+ };
+
+Put it in your destdir and now your can run `plackup -p <port>`.
+
+Note that you should configure your `url` and `cgiurl` to point to the listening address of plackup.
+
+Also, the app.psgi residing in the destdir means that /app.psgi is accessible from the web server.
+
+Hopefully some day ikiwiki web ui will speak psgi natively.