OpenLiteSpeed Web Server Users' Manual

Version 1.4 Rev. 1

External Application

LiteSpeed web server can forward requests to external applications to process and generate dynamic content. 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.

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. External applications can be set up in the {PAGE=ExtApp_Help} 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:
  1. Set the external application as a handler for a specific context.
  2. Set the external application as a handler of a script language via file suffix binding.
FastCGI applications, LSAPI applications, web servers, servlet engines, and load balancers have to be defined in the {PAGE=ExtApp_Help} section before you can configure them to handle a context or script suffix . It is not necessary to define CGI applications in the {PAGE=ExtApp_Help} section. 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.

Table of Contents

External Application Settings

Type | 

TypeGo to top
Description: 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
  • FastCGI: a FastCGI application with a Responder role.
  • FastCGI Authorizer: a FastCGI application with an Authorizer role
  • Servlet Engine: a servlet engine with an AJPv13 connector, such as Tomcat.
  • Web Server: a web server or application server that supports HTTP protocol.
  • LiteSpeed SAPI App: an application that communicates with the web server using LSAPI protocol.
  • Load Balancer: a virtual application that can balance load among worker applications.
  • Piped Logger: an application that can process access log entries received on its STDIN stream.
Syntax: Select from drop down list
Tips: 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.