Sophie

Sophie

distrib > Mageia > 7 > armv7hl > media > core-release > by-pkgid > d8544620e4ac7bee48ddb48c85d55709 > files > 585

ikiwiki-3.20190228-1.mga7.noarch.rpm

<!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' =&gt; Plack::App::CGIBin-&gt;new(file =&gt; './ikiwiki.cgi')-&gt;to_app;
    enable "Plack::Middleware::Static",
        path =&gt; sub { s!(^(?:/[^.]*)?/?&#036;)!&#036;{1}/index.html! },
            root =&gt; '.';
    mount '/' =&gt; Plack::App::File-&gt;new(root =&gt; ".")-&gt;to_app;
};
</code></pre>

<p>Put it in your destdir and now your can run <code>plackup -p &lt;port&gt;</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>