GCS Amplitude
GCS Amplitude

Apache Module mod_proxy_scgi

Use the default header (X-Sendfile) ProxySCGISendfile On

Use a different header ProxySCGISendfile X-Send-Static

This module requires the service of

. It provides support for the mod_proxySCGI protocol, version 1.

Thus, in order to get the ability of handling the SCGI protocol,

have to be present in the server.modproxyscgi

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.

ProxyPass /scgi-bin/ scgi://localhost:4000/

The balanced gateway needs

and at least one load balancer algorithm module, such as modproxybalancer

, in addition to the proxy modules listed above. modlbmethodbyrequests

is the default, and will be used for this example configuration.modlbmethodbyrequests

ProxyPass /scgi-bin/ balancer://somecluster/ BalancerMember scgi://localhost:4000 BalancerMember scgi://localhost:4001

will neither create nor export the modproxyscgi

to generate a "best guess" for | |---|

). This value is interpreted as a new local URL that Apache httpd internally redirects to.

does the same as modproxyscgi

in this regard, except that you can turn off the feature.mod_cgi

or other optimizations, which are not possible if the file comes over the backend socket. Additionally, the file contents are not transmitted twice.

argument determines the gateway behaviour:

and interprets the value as the filename to serve. The header is removed from the final response headers. This is equivalent to ProxySCGISendfile X-Sendfile

, but instead of the hardcoded header name X-Sendfile

Modules | Directives | FAQ | Glossary | Sitemap

Apache HTTP Server Version 2.4

Apache Module mod_proxy_scgi

Available Languages: en | fr

Examples

Remember, in order to make the following examples work, you have to enable mod_proxy and mod_proxy_scgi.

Environment Variables

In addition to the configuration directives that control the behaviour of mod_proxy, there are a number of environment variables that control the SCGI protocol provider:

ProxySCGIInternalRedirect Directive

The ProxySCGIInternalRedirect enables the backend to internally redirect the gateway to a different URL. This feature originates 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 (/). T

ProxySCGISendfile Directive

The ProxySCGISendfile directive enables the SCGI backend to let files be served directly by the gateway. This is useful for performance purposes — httpd can use sendfile or other optimizations, which are not possible if the file comes over the backend socket. Additionally, the file contents are not