]> granicus.if.org Git - apache/blob - docs/manual/mod/mod_proxy_scgi.html.en
Update transformations.
[apache] / docs / manual / mod / mod_proxy_scgi.html.en
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
4         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
5               This file is generated from xml source: DO NOT EDIT
6         XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
7       -->
8 <title>mod_proxy_scgi - Apache HTTP Server</title>
9 <link href="../style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
10 <link href="../style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
11 <link href="../style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" />
12 <link href="../images/favicon.ico" rel="shortcut icon" /></head>
13 <body>
14 <div id="page-header">
15 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p>
16 <p class="apache">Apache HTTP Server Version 2.3</p>
17 <img alt="" src="../images/feather.gif" /></div>
18 <div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="../images/left.gif" /></a></div>
19 <div id="path">
20 <a href="http://www.apache.org/">Apache</a> &gt; <a href="http://httpd.apache.org/">HTTP Server</a> &gt; <a href="http://httpd.apache.org/docs/">Documentation</a> &gt; <a href="../">Version 2.3</a> &gt; <a href="./">Modules</a></div>
21 <div id="page-content">
22 <div id="preamble"><h1>Apache Module mod_proxy_scgi</h1>
23 <div class="toplang">
24 <p><span>Available Languages: </span><a href="../en/mod/mod_proxy_scgi.html" title="English">&nbsp;en&nbsp;</a></p>
25 </div>
26 <table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>SCGI gateway module for <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code></td></tr>
27 <tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
28 <tr><th><a href="module-dict.html#ModuleIdentifier">Module Identifier:</a></th><td>proxy_scgi_module</td></tr>
29 <tr><th><a href="module-dict.html#SourceFile">Source File:</a></th><td>mod_proxy_scgi.c</td></tr>
30 <tr><th><a href="module-dict.html#Compatibility">Compatibility:</a></th><td>Available in version 2.2.14 and later</td></tr></table>
31 <h3>Summary</h3>
32
33     <p>This module <em>requires</em> the service of <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code>. It provides support for the
34     <a href="http://python.ca/scgi/protocol.txt">SCGI protocol, version
35     1</a>.</p>
36
37     <p>Thus, in order to get the ability of handling the SCGI protocol,
38     <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> and <code class="module"><a href="../mod/mod_proxy_scgi.html">mod_proxy_scgi</a></code> have to
39     be present in the server.</p>
40
41     <div class="warning"><h3>Warning</h3>
42       <p>Do not enable proxying until you have <a href="mod_proxy.html#access">secured your server</a>. Open proxy
43       servers are dangerous both to your network and to the Internet at
44       large.</p>
45     </div>
46 </div>
47 <div id="quickview"><h3 class="directives">Directives</h3>
48 <ul id="toc">
49 <li><img alt="" src="../images/down.gif" /> <a href="#proxyscgiinternalredirect">ProxySCGIInternalRedirect</a></li>
50 <li><img alt="" src="../images/down.gif" /> <a href="#proxyscgisendfile">ProxySCGISendfile</a></li>
51 </ul>
52 <h3>Topics</h3>
53 <ul id="topics">
54 <li><img alt="" src="../images/down.gif" /> <a href="#examples">Examples</a></li>
55 </ul><h3>See also</h3>
56 <ul class="seealso">
57 <li><code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code></li>
58 <li><code class="module"><a href="../mod/mod_proxy_balancer.html">mod_proxy_balancer</a></code></li>
59 </ul></div>
60 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
61 <div class="section">
62 <h2><a name="examples" id="examples">Examples</a></h2>
63     <p>Remember, in order to make the following examples work, you have to
64     enable <code class="module"><a href="../mod/mod_proxy.html">mod_proxy</a></code> and <code class="module"><a href="../mod/mod_proxy_scgi.html">mod_proxy_scgi</a></code>.</p>
65
66     <div class="example"><h3>Simple gateway</h3><p><code>
67       ProxyPass /scgi-bin/ scgi://localhost:4000/
68     </code></p></div>
69
70     <p>The balanced gateway needs <code class="module"><a href="../mod/mod_proxy_balancer.html">mod_proxy_balancer</a></code> and
71     at least one load balancer algorithm module, such as 
72     <code class="module"><a href="../mod/mod_lbmethod_byrequests.html">mod_lbmethod_byrequests</a></code>, in addition to the proxy
73     modules listed above.  <code class="module"><a href="../mod/mod_lbmethod_byrequests.html">mod_lbmethod_byrequests</a></code> is the
74     default, and will be used for this example configuration.</p>
75
76     <div class="example"><h3>Balanced gateway</h3><p><code>
77     ProxyPass /scgi-bin/ balancer://somecluster/<br />
78     &lt;Proxy balancer://somecluster/&gt;<br />
79     <span class="indent">
80         BalancerMember scgi://localhost:4000/<br />
81         BalancerMember scgi://localhost:4001/<br />
82     </span>
83     &lt;/Proxy&gt;
84     </code></p></div>
85 </div>
86 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
87 <div class="directive-section"><h2><a name="ProxySCGIInternalRedirect" id="ProxySCGIInternalRedirect">ProxySCGIInternalRedirect</a> <a name="proxyscgiinternalredirect" id="proxyscgiinternalredirect">Directive</a></h2>
88 <table class="directive">
89 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enable or disable internal redirect responses from the
90 backend</td></tr>
91 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxySCGIInternalRedirect On|Off</code></td></tr>
92 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProxySCGIInternalRedirect On</code></td></tr>
93 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
94 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
95 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy_scgi</td></tr>
96 </table>
97     <p>The <code class="directive">ProxySCGIInternalRedirect</code> enables the backend
98     to internally redirect the gateway to a different URL. This feature
99     origins in <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code>, which internally redirects the
100     response, if the response status is <code>OK</code> (<code>200</code>) and
101     the response contains a <code>Location</code> header and its value starts
102     with a slash (<code>/</code>). This value is interpreted as a new local
103     URL the apache internally redirects to.</p>
104
105     <p><code class="module"><a href="../mod/mod_proxy_scgi.html">mod_proxy_scgi</a></code> does the same as
106     <code class="module"><a href="../mod/mod_cgi.html">mod_cgi</a></code> in this regard, except that you can turn off the
107     feature.</p>
108
109     <div class="example"><h3>Example</h3><p><code>
110     ProxySCGIInternalRedirect Off
111     </code></p></div>
112
113 </div>
114 <div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
115 <div class="directive-section"><h2><a name="ProxySCGISendfile" id="ProxySCGISendfile">ProxySCGISendfile</a> <a name="proxyscgisendfile" id="proxyscgisendfile">Directive</a></h2>
116 <table class="directive">
117 <tr><th><a href="directive-dict.html#Description">Description:</a></th><td>Enable evaluation of <var>X-Sendfile</var> pseudo response
118 header</td></tr>
119 <tr><th><a href="directive-dict.html#Syntax">Syntax:</a></th><td><code>ProxySCGISendfile On|Off|<var>Headername</var></code></td></tr>
120 <tr><th><a href="directive-dict.html#Default">Default:</a></th><td><code>ProxySCGISendfile Off</code></td></tr>
121 <tr><th><a href="directive-dict.html#Context">Context:</a></th><td>server config, virtual host, directory</td></tr>
122 <tr><th><a href="directive-dict.html#Status">Status:</a></th><td>Extension</td></tr>
123 <tr><th><a href="directive-dict.html#Module">Module:</a></th><td>mod_proxy_scgi</td></tr>
124 </table>
125     <p>The <code class="directive">ProxySCGISendfile</code> directive enables the
126     SCGI backend to let files serve directly by the gateway. This is useful
127     performance purposes -- the httpd can use <code>sendfile</code> or other
128     optimizations, which are not possible if the file comes over the backend
129     socket.</p>
130     <p>The <code class="directive">ProxySCGISendfile</code> argument determines the
131     gateway behaviour:</p>
132     <dl>
133     <dt><code>Off</code></dt>
134     <dd>No special handling takes place.</dd>
135
136     <dt><code>On</code></dt>
137     <dd>The gateway looks for a backend response header called
138     <code>X-Sendfile</code> and interprets the value as filename to serve. The
139     header is removed from the final response headers. This is equivalent to
140     <code>ProxySCGIRequest X-Sendfile</code>.</dd>
141
142     <dt>anything else</dt>
143     <dd>Similar to <code>On</code>, but instead of the hardcoded header name
144     the argument is applied as header name.</dd>
145     </dl>
146
147     <div class="example"><h3>Example</h3><p><code>
148     # Use the default header (X-Sendfile)<br />
149     ProxySCGISendfile On<br />
150     <br />
151     # Use a different header<br />
152     ProxySCGISendfile X-Send-Static
153     </code></p></div>
154
155 </div>
156 </div>
157 <div class="bottomlang">
158 <p><span>Available Languages: </span><a href="../en/mod/mod_proxy_scgi.html" title="English">&nbsp;en&nbsp;</a></p>
159 </div><div id="footer">
160 <p class="apache">Copyright 2010 The Apache Software Foundation.<br />Licensed under the <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.</p>
161 <p class="menu"><a href="../mod/">Modules</a> | <a href="../mod/directives.html">Directives</a> | <a href="../faq/">FAQ</a> | <a href="../glossary.html">Glossary</a> | <a href="../sitemap.html">Sitemap</a></p></div>
162 </body></html>