mod_proxy_http.html.en revision 727872d18412fc021f03969b8641810d8896820b
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<?xml version="1.0" encoding="ISO-8859-1"?>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><!--
a78048ccbdb6256da15e6b0e7e95355e480c2301nd XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
a78048ccbdb6256da15e6b0e7e95355e480c2301nd This file is generated from xml source: DO NOT EDIT
a78048ccbdb6256da15e6b0e7e95355e480c2301nd XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
a78048ccbdb6256da15e6b0e7e95355e480c2301nd -->
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<title>mod_proxy_http - Apache HTTP Server</title>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<link href="/style/css/manual.css" rel="stylesheet" media="all" type="text/css" title="Main stylesheet" />
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<link href="/style/css/manual-loose-100pc.css" rel="alternate stylesheet" media="all" type="text/css" title="No Sidebar - Default font size" />
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen<link href="/style/css/manual-print.css" rel="stylesheet" media="print" type="text/css" /><link rel="stylesheet" type="text/css" href="/style/css/prettify.css" />
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen<script src="/style/scripts/prettify.js" type="text/javascript">
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen</script>
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<link href="/images/favicon.ico" rel="shortcut icon" /></head>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<body>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<div id="page-header">
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p>
3f08db06526d6901aa08c110b5bc7dde6bc39905nd<p class="apache">Apache HTTP Server Version 2.5</p>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<img alt="" src="/images/feather.gif" /></div>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<div class="up"><a href="./"><img title="&lt;-" alt="&lt;-" src="/images/left.gif" /></a></div>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<div id="path">
3f08db06526d6901aa08c110b5bc7dde6bc39905nd<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.5</a> &gt; <a href="./">Modules</a></div>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<div id="page-content">
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<div id="preamble"><h1>Apache Module mod_proxy_http</h1>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<div class="toplang">
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<p><span>Available Languages: </span><a href="/en/mod/mod_proxy_http.html" title="English">&nbsp;en&nbsp;</a> |
11495c9f0bd33e51a25b4d532beadfbcf9b944a3nilgun<a href="/fr/mod/mod_proxy_http.html" hreflang="fr" rel="alternate" title="Fran�ais">&nbsp;fr&nbsp;</a></p>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd</div>
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung<table class="module"><tr><th><a href="module-dict.html#Description">Description:</a></th><td>HTTP support module for
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code></td></tr>
4b575a6b6704b516f22d65a3ad35696d7b9ba372rpluem<tr><th><a href="module-dict.html#Status">Status:</a></th><td>Extension</td></tr>
4b575a6b6704b516f22d65a3ad35696d7b9ba372rpluem<tr><th><a href="module-dict.html#ModuleIdentifier">Module�Identifier:</a></th><td>proxy_http_module</td></tr>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<tr><th><a href="module-dict.html#SourceFile">Source�File:</a></th><td>mod_proxy_http.c</td></tr></table>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<h3>Summary</h3>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <p>This module <em>requires</em> the service of <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code>. It provides the features used for
a78048ccbdb6256da15e6b0e7e95355e480c2301nd proxying HTTP and HTTPS requests. <code class="module"><a href="/mod/mod_proxy_http.html">mod_proxy_http</a></code>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd supports HTTP/0.9, HTTP/1.0 and HTTP/1.1. It does <em>not</em>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd provide any caching abilities. If you want to set up a caching
a78048ccbdb6256da15e6b0e7e95355e480c2301nd proxy, you might want to use the additional service of the
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <code class="module"><a href="/mod/mod_cache.html">mod_cache</a></code> module.</p>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <p>Thus, in order to get the ability of handling HTTP proxy requests,
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code> and <code class="module"><a href="/mod/mod_proxy_http.html">mod_proxy_http</a></code>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd have to be present in the server.</p>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <div class="warning"><h3>Warning</h3>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <p>Do not enable proxying until you have <a href="mod_proxy.html#access">secured your server</a>. Open proxy
a78048ccbdb6256da15e6b0e7e95355e480c2301nd servers are dangerous both to your network and to the Internet at
a78048ccbdb6256da15e6b0e7e95355e480c2301nd large.</p>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd </div>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd</div>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<div id="quickview"><h3 class="directives">Directives</h3>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<p>This module provides no
a78048ccbdb6256da15e6b0e7e95355e480c2301nd directives.</p>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<h3>Topics</h3>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<ul id="topics">
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<li><img alt="" src="/images/down.gif" /> <a href="#env">Environment Variables</a></li>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<li><img alt="" src="/images/down.gif" /> <a href="#notes">Request notes</a></li>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd</ul><h3>See also</h3>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<ul class="seealso">
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<li><code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code></li>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<li><code class="module"><a href="/mod/mod_proxy_connect.html">mod_proxy_connect</a></code></li>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd</ul><ul class="seealso"><li><a href="#comments_section">Comments</a></li></ul></div>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<div class="section">
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<h2><a name="env" id="env">Environment Variables</a></h2>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <p>In addition to the configuration directives that control the
a78048ccbdb6256da15e6b0e7e95355e480c2301nd behaviour of <code class="module"><a href="/mod/mod_proxy.html">mod_proxy</a></code>, there are a number of
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <dfn>environment variables</dfn> that control the HTTP protocol
a78048ccbdb6256da15e6b0e7e95355e480c2301nd provider:</p>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <dl>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <dt>proxy-sendextracrlf</dt>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <dd>Causes proxy to send an extra CR-LF newline on the end of a
a78048ccbdb6256da15e6b0e7e95355e480c2301nd request. This is a workaround for a bug in some browsers.</dd>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <dt>force-proxy-request-1.0</dt>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <dd>Forces the proxy to send requests to the backend as HTTP/1.0
a78048ccbdb6256da15e6b0e7e95355e480c2301nd and disables HTTP/1.1 features.</dd>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <dt>proxy-nokeepalive</dt>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <dd>Forces the proxy to close the backend connection after
a78048ccbdb6256da15e6b0e7e95355e480c2301nd each request.</dd>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <dt>proxy-chain-auth</dt>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <dd>If the proxy requires authentication, it will read and
a78048ccbdb6256da15e6b0e7e95355e480c2301nd consume the proxy authentication credentials sent by the client.
a78048ccbdb6256da15e6b0e7e95355e480c2301nd With <var>proxy-chain-auth</var> it will <em>also</em> forward
a78048ccbdb6256da15e6b0e7e95355e480c2301nd the credentials to the next proxy in the chain. This may
a78048ccbdb6256da15e6b0e7e95355e480c2301nd be necessary if you have a chain of proxies that share
a78048ccbdb6256da15e6b0e7e95355e480c2301nd authentication information. <strong>Security Warning:</strong>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd Do not set this unless you know you need it, as it forwards
a78048ccbdb6256da15e6b0e7e95355e480c2301nd sensitive information!</dd>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <dt>proxy-sendcl</dt>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <dd>HTTP/1.0 required all HTTP requests that include a body
a78048ccbdb6256da15e6b0e7e95355e480c2301nd (e.g. POST requests) to include a <var>Content-Length</var>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd header. This environment variable forces the Apache proxy to
a78048ccbdb6256da15e6b0e7e95355e480c2301nd send this header to the backend server, regardless of what the
a78048ccbdb6256da15e6b0e7e95355e480c2301nd Client sent to the proxy. It ensures compatibility when
a78048ccbdb6256da15e6b0e7e95355e480c2301nd proxying for an HTTP/1.0 or unknown backend. However, it
a78048ccbdb6256da15e6b0e7e95355e480c2301nd may require the entire request to be buffered by the proxy,
a78048ccbdb6256da15e6b0e7e95355e480c2301nd so it becomes very inefficient for large requests.</dd>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <dt>proxy-sendchunks or proxy-sendchunked</dt>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <dd>This is the opposite of <var>proxy-sendcl</var>. It allows
a78048ccbdb6256da15e6b0e7e95355e480c2301nd request bodies to be sent to the backend using chunked transfer
a78048ccbdb6256da15e6b0e7e95355e480c2301nd encoding. This allows the request to be efficiently streamed,
a78048ccbdb6256da15e6b0e7e95355e480c2301nd but requires that the backend server supports HTTP/1.1.</dd>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <dt>proxy-interim-response</dt>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <dd>This variable takes values <code>RFC</code> (the default) or
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <code>Suppress</code>. Earlier httpd versions would suppress
a78048ccbdb6256da15e6b0e7e95355e480c2301nd HTTP interim (1xx) responses sent from the backend. This is
a78048ccbdb6256da15e6b0e7e95355e480c2301nd technically a violation of the HTTP protocol. In practice,
a78048ccbdb6256da15e6b0e7e95355e480c2301nd if a backend sends an interim response, it may itself be
a78048ccbdb6256da15e6b0e7e95355e480c2301nd extending the protocol in a manner we know nothing about,
a78048ccbdb6256da15e6b0e7e95355e480c2301nd or just broken. So this is now configurable: set
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <code>proxy-interim-response RFC</code> to be fully protocol
a78048ccbdb6256da15e6b0e7e95355e480c2301nd compliant, or <code>proxy-interim-response Suppress</code>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd to suppress interim responses.</dd>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <dt>proxy-initial-not-pooled</dt>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <dd>If this variable is set no pooled connection will be reused
a78048ccbdb6256da15e6b0e7e95355e480c2301nd if the client connection is an initial connection. This avoids
a78048ccbdb6256da15e6b0e7e95355e480c2301nd the "proxy: error reading status line from remote server" error message
a78048ccbdb6256da15e6b0e7e95355e480c2301nd caused by the race condition that the backend server closed the
a78048ccbdb6256da15e6b0e7e95355e480c2301nd pooled connection after the connection check by the proxy and
a78048ccbdb6256da15e6b0e7e95355e480c2301nd before data sent by the proxy reached the backend. It has to be
a78048ccbdb6256da15e6b0e7e95355e480c2301nd kept in mind that setting this variable downgrades performance,
a78048ccbdb6256da15e6b0e7e95355e480c2301nd especially with HTTP/1.0 clients.
a78048ccbdb6256da15e6b0e7e95355e480c2301nd </dd>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd </dl>
11495c9f0bd33e51a25b4d532beadfbcf9b944a3nilgun</div><div class="top"><a href="#page-header"><img alt="top" src="/images/up.gif" /></a></div>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd<div class="section">
f086b4b402fa9a2fefc7dda85de2a3cc1cd0a654rjung<h2><a name="notes" id="notes">Request notes</a></h2>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <p><code class="module"><a href="/mod/mod_proxy_http.html">mod_proxy_http</a></code> creates the following request notes for
5effc8b39fae5cd169d17f342bfc265705840014rbowen logging using the <code>%{VARNAME}n</code> format in
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen <code class="directive"><a href="/mod/mod_log_config.html#logformat">LogFormat</a></code> or
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen <code class="directive"><a href="/mod/core.html#errorlogformat">ErrorLogFormat</a></code>:
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen </p>
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen <dl>
d29d9ab4614ff992b0e8de6e2b88d52b6f1f153erbowen <dt>proxy-source-port</dt>
a78048ccbdb6256da15e6b0e7e95355e480c2301nd <dd>The local port used for the connection to the backend server.</dd>
<dt>proxy-status</dt>
<dd>The HTTP status received from the backend server.</dd>
</dl>
</div>
</div>
<div class="bottomlang">
<p><span>Available Languages: </span><a href="/en/mod/mod_proxy_http.html" title="English">&nbsp;en&nbsp;</a> |
<a href="/fr/mod/mod_proxy_http.html" hreflang="fr" rel="alternate" title="Fran�ais">&nbsp;fr&nbsp;</a></p>
</div><div class="top"><a href="#page-header"><img src="/images/up.gif" alt="top" /></a></div><div class="section"><h2><a id="comments_section" name="comments_section">Comments</a></h2><div class="warning"><strong>Notice:</strong><br />This is not a Q&amp;A section. Comments placed here should be pointed towards suggestions on improving the documentation or server, and may be removed again by our moderators if they are either implemented or considered invalid/off-topic. Questions on how to manage the Apache HTTP Server should be directed at either our IRC channel, #httpd, on Freenode, or sent to our <a href="http://httpd.apache.org/lists.html">mailing lists</a>.</div>
<script type="text/javascript"><!--//--><![CDATA[//><!--
var comments_shortname = 'httpd';
var comments_identifier = 'http://httpd.apache.org/docs/2.4/mod/mod_proxy_http.html.en';
(function(w, d) {
var disabled = false;
if (w.location.hostname.toLowerCase() == "httpd.apache.org" && disabled !== true) {
d.write('<div id="comments_thread"><\/div>');
var s = d.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = 'http://c.apaste.info/show_comments.lua?site=' + comments_shortname + '&page=' + comments_identifier;
(d.getElementsByTagName('head')[0] || d.getElementsByTagName('body')[0]).appendChild(s);
}
else {
d.write('<div id="comments_thread">Comments are disabled for this page at the moment.<\/div>');
}
})(window, document);
//--><!]]></script></div><div id="footer">
<p class="apache">Copyright 2012 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>
<p class="menu"><a href="/mod/">Modules</a> | <a href="/mod/directives.html">Directives</a> | <a href="http://wiki.apache.org/httpd/FAQ">FAQ</a> | <a href="/glossary.html">Glossary</a> | <a href="/sitemap.html">Sitemap</a></p></div><script type="text/javascript"><!--//--><![CDATA[//><!--
if (typeof(prettyPrint) !== 'undefined') {
prettyPrint();
}
//--><!]]></script>
</body></html>