Apache HTTP Server Version 2.2
This document refers to a legacy release (2.2) of Apache httpd. The active release (2.4) is documented here. If you have not already upgraded, please follow this link for more information.
You may follow this link to go to the current version of this document.
Description: | SCGI gateway module for mod_proxy |
---|---|
Status: | Extension |
Module Identifier: | proxy_scgi_module |
Source File: | mod_proxy_scgi.c |
Compatibility: | Available in version 2.2.14 and later |
This module requires the service of mod_proxy
. It provides support for the
SCGI protocol, version
1.
Thus, in order to get the ability of handling the SCGI protocol,
mod_proxy
and mod_proxy_scgi
have to
be present in the server.
Do not enable proxying until you have secured your server. Open proxy servers are dangerous both to your network and to the Internet at large.
Remember, in order to make the following examples work, you have to
enable mod_proxy
and mod_proxy_scgi
.
ProxyPass /scgi-bin/ scgi://localhost:4000/
The balanced gateway needs mod_proxy_balancer
in
addition to the already mentioned proxy modules.
ProxyPass /scgi-bin/ balancer://somecluster/
<Proxy balancer://somecluster/>
BalancerMember scgi://localhost:4000/
BalancerMember scgi://localhost:4001/
</Proxy>
Description: | Enable or disable internal redirect responses from the backend |
---|---|
Syntax: | ProxySCGIInternalRedirect On|Off |
Default: | ProxySCGIInternalRedirect On |
Context: | server config, virtual host, directory |
Status: | Extension |
Module: | mod_proxy_scgi |
The ProxySCGIInternalRedirect
enables the backend
to internally redirect the gateway to a different URL. This feature
origins in mod_cgi
, which internally redirects the
response, if the response status is OK
(200
) and
the response contains a Location
header and its value starts
with a slash (/
). This value is interpreted as a new local
URL the apache internally redirects to.
mod_proxy_scgi
does the same as
mod_cgi
in this regard, except that you can turn off the
feature.
ProxySCGIInternalRedirect Off
Description: | Enable evaluation of X-Sendfile pseudo response header |
---|---|
Syntax: | ProxySCGISendfile On|Off|Headername |
Default: | ProxySCGISendfile Off |
Context: | server config, virtual host, directory |
Status: | Extension |
Module: | mod_proxy_scgi |
The ProxySCGISendfile
directive enables the
SCGI backend to let files serve directly by the gateway. This is useful
performance purposes -- the httpd can use sendfile
or other
optimizations, which are not possible if the file comes over the backend
socket.
The ProxySCGISendfile
argument determines the
gateway behaviour:
Off
On
X-Sendfile
and interprets the value as filename to serve. The
header is removed from the final response headers. This is equivalent to
ProxySCGISendfile X-Sendfile
.On
, but instead of the hardcoded header name
the argument is applied as header name.
# Use the default header (X-Sendfile)
ProxySCGISendfile On
# Use a different header
ProxySCGISendfile X-Send-Static