LiteSpeed Web Server Users' Manual - Script Handler
Description: LiteSpeed Web Server Users' Manual - Script Handler.

## LiteSpeed Web Server
Users' Manual

### Version 6.3 — Rev. 4

- License Enterprise
- Introduction
- Installation
- Administration
- Security
- Configuration
  - Server General
  - Server Log
  - Server Tuning
  - Server Security
  - Page Cache
  - PageSpeed Config
  - External Apps
  - Fast CGI App
  - Fast CGI Authorizer
  - LSAPI App
  - Servlet Engine
  - Web Server
  - Piped logger
  - Load Balancer
  - Script Handler
  - PHP
  - App Server Settings
  - Listener General
  - Listener SSL
  - Virtual Host Templates
  - Virtual Host Basic
  - Virtual Host General
  - Virtual Host Security
  - Virtual Host SSL
  - Virtual Host PageSpeed Config
  - Rewrite
  - Context
  - Static Context
  - Java Web App Context
  - Servlet Context
  - Fast CGI Context
  - LSAPI Context
  - Proxy Context
  - CGI Context
  - Load Balancer Context
  - Redirect Context
  - App Server Context
  - Rack/Rails Context
  - Add-ons
- Web Console
  - Admin Console General
  - Admin Console Security
  - Admin Listener General
  - Admin Listener SSL

# Script Handler

LiteSpeed Web Server supports all scripting languages including Perl, PHP, Ruby, Python, Java, etc. Scripts written in these different languages must be brought to the appropriate external application to be processed. LiteSpeed Web Server uses script handlers to decide which external application a script should go to. These script handlers map files to external applications by using the file suffix. (Actually, the suffix is used to determine a MIME type which is then mapped to the external application.) External applications must be set up in the External Application tab before they can be selected for use in a script handler.
You can set up script handler at the server or virtual host level. Server-level script handlers apply to all virtual hosts unless overridden in virtual host level. Virtual host-level script handlers only apply within that virtual host.

## Table of Contents

### Suffix⇑

#### Description

Specifies the script file suffixes that will be handled by this script handler. Suffixes must be unique.

#### Syntax

Comma delimited list with period "." character prohibited.

#### Tips

The server will automatically add a special MIME type ("application/x-httpd-[suffix]") for the first suffix in the list. For example, MIME type "application/x-httpd-php53" will be added for suffix "php53". Suffixes after the first need to set up in the MIME Settings settings.
Though we list suffixes in this field, the script handlers use MIME types, not suffixes, to decide which scripts to handle. You can thus use the Apache configuration directives "AddType" and "ForceType" (which control file MIME types) in .htaccess files to change which script handler certain files will use. For example, with the directive AddType application/x-httpd-php53 .php in a properly placed .htaccess file, you can stipulate that php files in this directory have the MIME type "application/x-httpd-php53" and thus will be handled by the script handler that uses MIME type "application/x-httpd-php53" (suffix "php53"). This then allows you to assign different script handlers, not only for different file suffixes, but also based on the locations of files.
Only specify the suffixes you really need.

### Handler Type⇑

#### Description

Specifies the type of external application that processes these script files. Available types are: CGI, FastCGI, Web Server, LSAPI app, Load balancer, or Servlet Engine. For FastCGI, Web Server and Servlet Engine, a Handler Name needs to be specified. This is an external application name as predefined in the External Apps section.

#### Syntax

Select from drop down list

### Handler Name⇑

#### Description

Specifies the name of the external application that processes the script files when the handler type is FastCGI, Web Server, LSAPI, Load Balancer, or Servlet Engine.

#### Syntax

Select from drop down list