<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>psgi</title> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel="stylesheet" href="../style.css" type="text/css" /> <link rel="stylesheet" href="../local.css" type="text/css" /> </head> <body> <div class="page"> <div class="pageheader"> <div class="header"> <span> <span class="parentlinks"> <a href="../index.html">ikiwiki</a>/ <a href="../tips.html">tips</a>/ </span> <span class="title"> psgi </span> </span> </div> </div> <div id="pagebody"> <div id="content" role="main"> <p>Here's the app.psgi file if you want to run ikiwiki with <a href="http://plackperl.org">PSGI</a> instead of apache or other web servers:</p> <pre><code>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; }; </code></pre> <p>Put it in your destdir and now your can run <code>plackup -p <port></code>.</p> <p>Note that you should configure your <code>url</code> and <code>cgiurl</code> to point to the listening address of plackup.</p> <p>Also, the app.psgi residing in the destdir means that /app.psgi is accessible from the web server.</p> <p>Hopefully some day ikiwiki web ui will speak psgi natively.</p> </div> </div> <div id="footer" class="pagefooter" role="contentinfo"> <div id="pageinfo"> <div class="pagedate"> Last edited <span class="date">Tue Feb 26 23:01:54 2019</span> <!-- Created <span class="date">Sun Dec 12 07:33:25 2010</span> --> </div> </div> <!-- from ikiwiki --> </div> </div> </body> </html>