| Server IP : 216.107.138.43 / Your IP : 216.73.217.127 Web Server : LiteSpeed System : Linux srv514655384.host.ultaserver.net 5.15.0-124-generic #134-Ubuntu SMP Fri Sep 27 20:20:17 UTC 2024 x86_64 User : ojolc3829 ( 1151) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/local/lsws/docs/ |
Upload File : |
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<title>OpenLiteSpeed Users' Manual - External Apps</title>
<meta name="description" content="OpenLiteSpeed Users' Manual - External Apps." />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="noindex">
<script>
(function () {
var theme = 'light';
var resolved = false;
try {
if (window.localStorage) {
var storedTheme = window.localStorage.getItem('hdoc.theme');
if (storedTheme === 'light' || storedTheme === 'dark') {
theme = storedTheme;
resolved = true;
}
}
} catch (err) {
}
if (!resolved && window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
theme = 'dark';
}
document.documentElement.setAttribute('data-theme', theme);
document.documentElement.style.colorScheme = theme;
}());
</script>
<link rel="shortcut icon" href="img/favicon.ico" />
<link rel="stylesheet" type="text/css" href="css/hdoc.css">
<link rel="stylesheet" type="text/css" href="css/hdoc-product-accent.css">
<script src="hdoc-search-index.js" defer></script>
<script src="js/hdoc-search.js" defer></script>
</head>
<body>
<div class="doc-shell">
<header class="doc-topbar">
<a class="doc-brand" href="index.html" aria-label="OpenLiteSpeed Users' Manual">
<img src="img/ols_logo.svg" alt="OpenLiteSpeed logo" />
<strong>OpenLiteSpeed Users' Manual</strong>
</a>
<div class="doc-actions">
<button class="doc-menu-toggle" type="button" aria-label="Open menu" data-menu-toggle aria-expanded="false">
<svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M3 12h18M3 6h18M3 18h18" stroke="currentColor" stroke-width="2" stroke-linecap="round"/></svg>
</button>
<form class="doc-search" role="search" data-empty="Search pages and settings" data-no-results="No results found.">
<label class="sr-only" for="doc-search-input">Search the manual</label>
<div class="doc-search__box">
<input id="doc-search-input" type="search" autocomplete="off" placeholder="Search pages and settings" aria-controls="doc-search-results" />
<button type="submit">Search</button>
</div>
<div id="doc-search-results" class="doc-search__results" hidden></div>
</form>
</div>
<label class="doc-language"><select id="doc-language-switcher" name="doc_language" data-language-switcher aria-label="Language"><option value="ExtApp_Help.html" data-lang="en-US" selected>English</option><option value="es-ES/ExtApp_Help.html" data-lang="es-ES">Español</option><option value="de-DE/ExtApp_Help.html" data-lang="de-DE">Deutsch</option><option value="fr-FR/ExtApp_Help.html" data-lang="fr-FR">Français</option><option value="zh-CN/ExtApp_Help.html" data-lang="zh-CN">简体中文</option><option value="ja-JP/ExtApp_Help.html" data-lang="ja-JP">日本語</option></select></label>
<button class="doc-theme-toggle" type="button" aria-label="Toggle theme" data-theme-toggle data-theme-light-label="Light mode" data-theme-dark-label="Dark mode" title="Toggle theme">
<span class="doc-theme-toggle__icon" aria-hidden="true"></span>
</button>
</header>
<div class="doc-menu-backdrop" data-menu-backdrop></div>
<div class="pagewrapper" data-current-lang="en-US" data-supported-langs="["en-US","es-ES","de-DE","fr-FR","zh-CN","ja-JP"]"><aside class="sidetree"><div class="sidetree__masthead"><figure class="sidetree__figure"><img src="img/ols_logo.svg" alt="OpenLiteSpeed logo" /></figure><div class="sidetree__identity"><a class="sidetree__manual-link" href="index.html">Users' Manual</a><div class="sidetree__version">Version 1.9 — Rev. 3</div></div></div><nav class="sidetree__nav" aria-label="Table of Contents"><ul class="sidetree__list">
<li><a href="license.html">License</a></li>
<li><a href="intro.html">Introduction</a></li>
<li><a href="install.html">Installation/Uninstallation</a></li>
<li>
<a href="admin.html">Administration</a>
<ul class="level2">
<li><a href="ServerStat_Help.html">Service Manager</a></li>
<li><a href="Real_Time_Stats_Help.html">Real-Time Stats</a></li>
</ul>
</li>
<li><a href="security.html">Security</a></li>
<li>
<a href="config.html">Configuration</a>
<ul class="level2">
<li><a href="ServGeneral_Help.html">Server General</a></li>
<li><a href="ServLog_Help.html">Server Log</a></li>
<li><a href="ServTuning_Help.html">Server Tuning</a></li>
<li><a href="ServSecurity_Help.html">Server Security</a></li>
<li>
<a class="current" href="ExtApp_Help.html">External Apps</a>
<ul class="level3">
<li><a href="External_LSAPI.html">LSAPI App</a></li>
<li><a href="External_WS.html">Web Server (Proxy)</a></li>
<li><a href="External_FCGI.html">Fast CGI App</a></li>
<li><a href="External_FCGI_Auth.html">Fast CGI Authorizer</a></li>
<li><a href="External_SCGI.html">Simple CGI App</a></li>
<li><a href="External_Servlet.html">Servlet Engine</a></li>
<li><a href="External_PL.html">Piped Logger</a></li>
<li><a href="External_LB.html">Load Balancer</a></li>
<li><a href="External_UWSGI.html">uWSGI</a></li>
</ul>
</li>
<li><a href="ScriptHandler_Help.html">Script Handler</a></li>
<li><a href="App_Server_Help.html">App Server Settings</a></li>
<li><a href="Module_Help.html">Module Configuration</a></li>
<li><a href="Listeners_General_Help.html">Listener General</a></li>
<li><a href="Listeners_SSL_Help.html">Listener SSL</a></li>
<li><a href="Templates_Help.html">Virtual Host Templates</a></li>
<li><a href="VirtualHosts_Help.html">Virtual Host Registration</a></li>
<li><a href="VHGeneral_Help.html">Virtual Host General</a></li>
<li><a href="VHSecurity_Help.html">Virtual Host Security</a></li>
<li><a href="VHSSL_Help.html">Virtual Host SSL</a></li>
<li><a href="Rewrite_Help.html">Rewrite</a></li>
<li>
<a href="Context_Help.html">Context</a>
<ul class="level3">
<li><a href="Static_Context.html">Static Context</a></li>
<li><a href="Java_Web_App_Context.html">Java Web App Context</a></li>
<li><a href="Servlet_Context.html">Servlet Context</a></li>
<li><a href="FCGI_Context.html">Fast CGI Context</a></li>
<li><a href="SCGI_Context.html">Simple CGI Context</a></li>
<li><a href="LSAPI_Context.html">LSAPI Context</a></li>
<li><a href="Proxy_Context.html">Proxy Context</a></li>
<li><a href="CGI_Context.html">CGI Context</a></li>
<li><a href="LB_Context.html">Load Balancer Context</a></li>
<li><a href="Redirect_Context.html">Redirect Context</a></li>
<li><a href="App_Server_Context.html">App Server Context</a></li>
<li><a href="UWSGI_Context.html">uWSGI Context</a></li>
<li><a href="Module_Context.html">Module Handler Context</a></li>
</ul>
</li>
<li><a href="VHWebSocket_Help.html">Web Socket Proxy</a></li>
</ul>
</li>
<li><a href="webconsole.html">Web Console</a>
<ul class="level2">
<li><a href="AdminGeneral_Help.html">Admin Console General</a></li>
<li><a href="AdminSecurity_Help.html">Admin Console Security</a></li>
<li><a href="AdminListeners_General_Help.html">Admin Listener General</a></li>
<li><a href="AdminListeners_SSL_Help.html">Admin Listener SSL</a></li>
</ul>
</li>
</ul></nav></aside><article class="contentwrapper"><div class="nav-bar"><div class="prev">« <a href="ServSecurity_Help.html">Server Security</a></div><div class="center"><a href="config.html">Configuration</a></div><div class="next"><a href="ScriptHandler_Help.html">Script Handler</a> »</div></div>
<header class="doc-page-header"><h1>External Apps</h1><div class="doc-page-intro">LiteSpeed Web Server can forward requests to external applications to process and generate dynamic content.<br/><br/> Since 2.0, LiteSpeed Web Server has supported seven types of external applications: CGI, FastCGI, web server, servlet engine, LiteSpeed SAPI application, load balancer, and piped logger.<br/> <ul> <li> CGI stands for Common Gateway Interface. The current standard is CGI/1.1. CGI applications run in standalone processes. A CGI process is started for each request and will exit after finishing the request. </li> <li> FastCGI is a fast, open, and secure web server interface that solves the performance problems inherent in CGI without introducing the overhead and complexity of proprietary APIs (Application Programming Interfaces). For more information, please visit <a href="https://fastcgi-archives.github.io/">https://fastcgi-archives.github.io/</a>.<br/><br/> On LiteSpeed Web Server, FastCGI applications can take two roles: generating dynamic responses (a responder role) or authorizing requests (an authorizer role). LiteSpeed Web Server further defines two types of FastCGI applications: local FastCGI and remote FastCGI. Local FastCGI applications are started automatically by the web server on demand. Remote FastCGI applications are not started by the web server. (They can run on a remote machine or on the same machine.) </li> <li> A web server is a server application that supports HTTP 1.0/1.1 protocols. LiteSpeed Web Server can serve as a transparent reverse proxy to accelerate and protect web servers and application servers. When communicating with backend web servers, LiteSpeed will always try to utilize persistent connections in order to achieve the highest performance. </li> <li> A servlet engine is an application, like Apache Tomcat and Jetty, that implements Java servlets and Java Server Pages. LiteSpeed can communicate with servlet engines through AJPv1.3 (Apache JServ Protocol version 1.3). Servlet engine cannot be started by the web server and can be set up to run on a remote machine. </li> <li> A LiteSpeed SAPI (LiteSpeed Server Application Programming Interface) application is an application that communicates with LiteSpeed Web Server through LSAPI, a fast, scalable server interface specifically designed for LiteSpeed Web Server to achieve maximum efficiency.<br/><br/> LSAPI's mechanism of action are similar to FastCGI, but LSAPI applications can be up to 30% faster than comparable FastCGI applications. LSAPI is highly recommended over FastCGI for supported applications. (LSAPI currently supports applications written in PHP, Ruby, and Python.)<br/><br/> For more information about LSAPI, please visit <a href="https://www.litespeedtech.com/open-source/litespeed-sapi"> https://www.litespeedtech.com/open-source/litespeed-sapi </a>. </li> <li> A load balancer is a virtual external application, which assigns requests to backend worker applications based on workload. Worker applications can be CGI, FastCGI, Web Server (Proxy), servlet engine, or LSAPI applications. Different types of applications can be mixed together under one load balancer. Load balancers and piped loggers cannot be used as worker applications. </li> <li> A piped logger is an application that can process access logs in real-time, writing an access log into database or performing real-time statistics calculations, for example. </li> </ul><br/><br/> Unlike CGI applications, FastCGI applications, LSAPI applications, and servlet engine do not exit after processing a request. The application process will stay/persist and serve as many requests as it can. The socket connection can be reused for multiple requests as well.<br/><br/> External applications can be set up in the <span class="tagP"><a href="#ExtApp_Help">External Apps</a></span> section. External applications cannot, however, function on their own. Additional settings must be configured so that the web server knows which requests to send to which application. There are two ways to to configure this in LiteSpeed Web Server:<br/><br/> <ol> <li> Set the external application as a handler for a specific context.</li> <li> Set the external application as a handler of a script language via file suffix binding.</li> </ol><br/><br/> FastCGI applications, LSAPI applications, Web Servers (Proxy), servlet engines, and load balancers have to be defined in the <span class="tagP"><a href="#ExtApp_Help">External Apps</a></span> section before you can configure them to handle a context or script suffix. It is not necessary to define CGI applications in the <span class="tagP"><a href="#ExtApp_Help">External Apps</a></span> section.<br/><br/> External applications can be configured at the server level or at the virtual host level. When configured at the server level, the application can be used by all virtual hosts. When configured at the virtual host level, it can only be used by that virtual host.</div>
</header><section class="doc-toc" aria-labelledby="top"><header class="doc-toc__header"><h2 id="top">Table of Contents</h2></header><section class="doc-toc__row"><h3 class="doc-toc__heading">New External App</h3><ul class="doc-toc__links"><li><a href="#extAppType">Type</a></li></ul></section>
</section>
<section class="doc-content-flow"><div class="helpitem"><article class="ls-helpitem"><header class="ls-helpitem__header" id="extAppType"><h3>Type<span class="ls-permlink"><a href="#extAppType"></a></span></h3></header><h4>Description</h4><p>Specifies the type of external application. Application types are differentiated by the service they provide or the protocol they use to communicate with the server. Choose from <ul> <li><span class="val">LiteSpeed SAPI App</span>: an application that communicates with the web server using the LSAPI protocol.</li> <li><span class="val">Web Server (Proxy)</span>: a web server or application server that supports HTTP protocol.</li> <li><span class="val">FastCGI App</span>: a FastCGI application with a <span class="val">Responder</span> role.</li> <li><span class="val">FastCGI Authorizer</span>: a FastCGI application with an <span class="val">Authorizer</span> role</li> <li><span class="val">SCGI App</span>: an application that communicates with the web server using the SCGI protocol.</li> <li><span class="val">Servlet Engine</span>: a servlet engine with an AJPv13 connector, such as Tomcat.</li> <li><span class="val">Piped Logger</span>: an application that can process access log entries received on its STDIN stream.</li> <li><span class="val">Load Balancer</span>: a virtual application that can balance load among worker applications.</li> <li><span class="val">uWSGI</span>: an application that communicates with the web server using the uWSGI protocol.<.</li> </ul></p> <h4>Syntax</h4><p>Select from drop down list</p> <h4>Tips</h4><p><span class="ls-badge ls-badge--info">Information</span> Most applications will use either LSAPI or FastCGI protocol. LSAPI supports PHP, Ruby, and Python. Perl can be used with FastCGI. (PHP, Ruby, and Python can also be set up to run using FastCGI, but they run faster using LSAPI.) Java uses servlet engines.</p> </article> </div>
</section>
</article></div><button class="doc-back-to-top" type="button" aria-label="Back to top" data-back-to-top><svg viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M12 19V5" /><path d="m6 11 6-6 6 6" /></svg><span class="sr-only">Back to top</span></button><footer class="copyright">Copyright © 2013-2026. <a href="https://www.litespeedtech.com">LiteSpeed Technologies Inc.</a> All rights reserved.</footer>
</div>
</body>
</html>