2018-03-23 06:52:15 +01:00
<!DOCTYPE html>
< html lang = "en" dir = "ltr" >
< head >
< meta charset = "utf-8" / >
< title > documentation:2.0:psgi< / title >
< meta name = "generator" content = "DokuWiki" / >
2018-05-17 21:42:46 +02:00
< meta name = "robots" content = "noindex,nofollow" / >
2018-03-23 06:52:15 +01:00
< meta name = "keywords" content = "documentation,2.0,psgi" / >
< link rel = "search" type = "application/opensearchdescription+xml" href = "lib/exe/opensearch.html" title = "LemonLDAP::NG" / >
< link rel = "start" href = "psgi.html" / >
< link rel = "contents" href = "psgi.html" title = "Sitemap" / >
< link rel = "stylesheet" type = "text/css" href = "lib/exe/css.php.t.bootstrap3.css" / >
<!-- //if:usedebianlibs
< link rel = "stylesheet" type = "text/css" href = "/javascript/bootstrap/css/bootstrap.min.css" / >
//elsif:useexternallibs
< link rel = "stylesheet" type = "text/css" href = "https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" > < / script >
//elsif:cssminified
< link rel = "stylesheet" type = "text/css" href = "/static/bwr/bootstrap/dist/css/bootstrap.min.css" / >
//else -->
< link rel = "stylesheet" type = "text/css" href = "/static/bwr/bootstrap/dist/css/bootstrap.css" / >
<!-- //endif -->
< script type = "text/javascript" > / * < ! [ C D A T A [ * / v a r N S = ' d o c u m e n t a t i o n : 2 . 0 ' ; v a r J S I N F O = { " i d " : " d o c u m e n t a t i o n : 2 . 0 : p s g i " , " n a m e s p a c e " : " d o c u m e n t a t i o n : 2 . 0 " } ;
/*!]]>*/< / script >
< script type = "text/javascript" charset = "utf-8" src = "lib/exe/js.php.t.bootstrap3.js" > < / script >
<!-- //if:usedebianlibs
< script type = "text/javascript" src = "/javascript/jquery/jquery.min.js" > < / script >
//elsif:useexternallibs
< script type = "text/javascript" src = "http://code.jquery.com/jquery-2.2.0.min.js" > < / script >
//elsif:jsminified
< script type = "text/javascript" src = "/static/bwr/jquery/dist/jquery.min.js" > < / script >
//else -->
< script type = "text/javascript" src = "/static/bwr/jquery/dist/jquery.js" > < / script >
<!-- //endif -->
<!-- //if:usedebianlibs
< script type = "text/javascript" src = "/javascript/jquery-ui/jquery-ui.min.js" > < / script >
//elsif:useexternallibs
< script type = "text/javascript" src = "http://code.jquery.com/ui/1.10.4/jquery-ui.min.js" > < / script >
//elsif:jsminified
< script type = "text/javascript" src = "/static/bwr/jquery-ui/jquery-ui.min.js" > < / script >
//else -->
< script type = "text/javascript" src = "/static/bwr/jquery-ui/jquery-ui.js" > < / script >
<!-- //endif -->
< / head >
< body >
< div class = "dokuwiki export container" >
< h1 class = "sectionedit1" id = "advanced_psgi_usage" > Advanced PSGI usage< / h1 >
< div class = "level1" >
< p >
LLNG is build on < a href = "http://plackperl.org/" class = "urlextern" title = "http://plackperl.org/" rel = "nofollow" > Plack< / a > , so it can be used with any compatible server:
< / p >
< ul >
< li class = "level1" > < div class = "li" > < a href = "https://metacpan.org/pod/starman" class = "urlextern" title = "https://metacpan.org/pod/starman" rel = "nofollow" > Starman< / a > < / div >
< / li >
< li class = "level1" > < div class = "li" > < a href = "https://metacpan.org/pod/twiggy" class = "urlextern" title = "https://metacpan.org/pod/twiggy" rel = "nofollow" > Twiggy< / a > < / div >
< / li >
< li class = "level1" > < div class = "li" > < a href = "https://metacpan.org/pod/Twiggy::Prefork" class = "urlextern" title = "https://metacpan.org/pod/Twiggy::Prefork" rel = "nofollow" > Twiggy::Prefork< / a > < / div >
< / li >
< li class = "level1" > < div class = "li" > < a href = "https://metacpan.org/pod/feersum" class = "urlextern" title = "https://metacpan.org/pod/feersum" rel = "nofollow" > Starman< / a > < / div >
< / li >
< li class = "level1" > < div class = "li" > uWSGI using < a href = "http://uwsgi-docs.readthedocs.io/en/latest/Perl.html" class = "urlextern" title = "http://uwsgi-docs.readthedocs.io/en/latest/Perl.html" rel = "nofollow" > uWSGI PSGI plugin< / a > < / div >
< / li >
2018-04-23 14:58:36 +02:00
< li class = "level1" > < div class = "li" > < strong > Alternative< / strong > : < a href = "nodehandler.html" class = "wikilink1" title = "documentation:2.0:nodehandler" > Node.js handler< / a > can be used as FastCGI server, only for application protection< / div >
< / li >
2018-03-23 06:52:15 +01:00
< / ul >
< p >
2018-05-17 21:42:46 +02:00
uWSGI or < a href = "nodehandler.html" class = "wikilink1" title = "documentation:2.0:nodehandler" > Node.js FastCGI server< / a > may provide the highest performance.
2018-03-23 06:52:15 +01:00
< / p >
< / div >
2018-05-17 21:42:46 +02:00
<!-- EDIT1 SECTION "Advanced PSGI usage" [1 - 635] -->
2018-03-23 06:52:15 +01:00
< h2 class = "sectionedit2" id = "fastcgi_server_replacement" > FastCGI server replacement< / h2 >
< div class = "level2" >
< p >
A < code > llng-server.psgi< / code > is provided in example directory. It is designed to replace exactly FastCGI server. You can use it :
< / p >
< ul >
2018-05-17 21:42:46 +02:00
< li class = "level1" > < div class = "li" > with a FCGI Plack server, but you just have to change llng-fastcgi-server engine < em > (in /etc/default/llng-fastcgi-server)< / em > to have the same result. Available engines:< / div >
< ul >
< li class = "level2" > < div class = "li" > < a href = "https://metacpan.org/pod/Plack::Handler::FCGI" class = "urlextern" title = "https://metacpan.org/pod/Plack::Handler::FCGI" rel = "nofollow" > FCGI< / a > < strong > (default)< / strong > < / div >
< / li >
< li class = "level2" > < div class = "li" > < a href = "https://metacpan.org/pod/Plack::Handler::AnyEvent::FCGI" class = "urlextern" title = "https://metacpan.org/pod/Plack::Handler::AnyEvent::FCGI" rel = "nofollow" > AnyEvent::FCGI< / a > < / div >
< / li >
< li class = "level2" > < div class = "li" > < a href = "https://metacpan.org/pod/Plack::Handler::FCGI::EV" class = "urlextern" title = "https://metacpan.org/pod/Plack::Handler::FCGI::EV" rel = "nofollow" > FCGI::EV< / a > < / div >
< / li >
< li class = "level2" > < div class = "li" > < a href = "https://metacpan.org/pod/Plack::Handler::FCGI::Engine" class = "urlextern" title = "https://metacpan.org/pod/Plack::Handler::FCGI::Engine" rel = "nofollow" > FCGI::Engine< / a > < / div >
2018-03-23 06:52:15 +01:00
< / li >
2018-05-17 21:42:46 +02:00
< li class = "level2" > < div class = "li" > < a href = "https://metacpan.org/pod/Plack::Handler::FCGI::Engine::ProcManager" class = "urlextern" title = "https://metacpan.org/pod/Plack::Handler::FCGI::Engine::ProcManager" rel = "nofollow" > FCGI::Engine::ProcManager< / a > < / div >
< / li >
< li class = "level2" > < div class = "li" > < a href = "https://metacpan.org/pod/Plack::Handler::FCGI::Async" class = "urlextern" title = "https://metacpan.org/pod/Plack::Handler::FCGI::Async" rel = "nofollow" > FCGI::Async< / a > < / div >
< / li >
< / ul >
2018-03-23 06:52:15 +01:00
< / li >
< li class = "level1" > < div class = "li" > with uWSGI < em > < strong > (see below)< / strong > < / em > < / div >
< / li >
< / ul >
< div class = "noteimportant" > Starman, Twiggy,… are HTTP servers, not FCGI ones !
< / div >
< p >
You can also replace only a part of it to create a specialized FastCGI server (portal,…). Look at < code > llng-server.psgi< / code > example and take the part you want to use.
< / p >
< p >
There are also some other psgi files in examples directory.
< / p >
< p >
See also < a href = "highperfnginxhandler.html" class = "wikilink1" title = "documentation:2.0:highperfnginxhandler" > High performance handler for Nginx< / a >
< / p >
< / div >
2018-05-17 21:42:46 +02:00
<!-- EDIT2 SECTION "FastCGI server replacement" [636 - 1878] -->
2018-03-23 06:52:15 +01:00
< h3 class = "sectionedit3" id = "using_uwsgi" > Using uWSGI< / h3 >
< div class = "level3" >
< p >
You must install uWSGI PSGI plugin. Then for example, launch llng-server.psgi < em > (simple example)< / em > :
< / p >
< pre class = "code" > uwsgi --plugins psgi --socket :5000 --psgi e2e-tests/llng-server.psgi< / pre >
< p >
You will find in LLNG Nginx configuration files some comments that explain how to configure Nginx to use uWSGI instead of LLNG FastCGI server.
< / p >
< / div >
2018-05-17 21:42:46 +02:00
<!-- EDIT3 SECTION "Using uWSGI" [1879 - ] --> < / div >
2018-03-23 06:52:15 +01:00
< / body >
< / html >