mod_proxy_http.xml revision 83adf5bfebbca92456b367a2cea7d4a39a51d533
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent<?xml version="1.0"?>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent<!DOCTYPE modulesynopsis SYSTEM "/style/modulesynopsis.dtd">
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent<?xml-stylesheet type="text/xsl" href="/style/manual.en.xsl"?>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent<!-- $LastChangedRevision$ -->
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent<!--
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent Licensed to the Apache Software Foundation (ASF) under one or more
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent contributor license agreements. See the NOTICE file distributed with
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent this work for additional information regarding copyright ownership.
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent The ASF licenses this file to You under the Apache License, Version 2.0
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent (the "License"); you may not use this file except in compliance with
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent the License. You may obtain a copy of the License at
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent http://www.apache.org/licenses/LICENSE-2.0
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent Unless required by applicable law or agreed to in writing, software
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent distributed under the License is distributed on an "AS IS" BASIS,
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent See the License for the specific language governing permissions and
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent limitations under the License.
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent-->
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent<modulesynopsis metafile="mod_proxy_http.xml.meta">
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent<name>mod_proxy_http</name>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent<description>HTTP support module for
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent<module>mod_proxy</module></description>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent<status>Extension</status>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent<sourcefile>mod_proxy_http.c</sourcefile>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent<identifier>proxy_http_module</identifier>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent<summary>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent <p>This module <em>requires</em> the service of <module
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent >mod_proxy</module>. It provides the features used for
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent proxying HTTP and HTTPS requests. <module>mod_proxy_http</module>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent supports HTTP/0.9, HTTP/1.0 and HTTP/1.1. It does <em>not</em>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent provide any caching abilities. If you want to set up a caching
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent proxy, you might want to use the additional service of the
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent <module>mod_cache</module> module.</p>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent <p>Thus, in order to get the ability of handling HTTP proxy requests,
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent <module>mod_proxy</module> and <module>mod_proxy_http</module>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent have to be present in the server.</p>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent <note type="warning"><title>Warning</title>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent <p>Do not enable proxying until you have <a
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent href="mod_proxy.html#access">secured your server</a>. Open proxy
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent servers are dangerous both to your network and to the Internet at
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent large.</p>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent </note>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent</summary>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent<seealso><module>mod_proxy</module></seealso>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent<seealso><module>mod_proxy_connect</module></seealso>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent<section id="env"><title>Environment Variables</title>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent <p>In addition to the configuration directives that control the
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent behaviour of <module>mod_proxy</module>, there are a number of
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent <dfn>environment variables</dfn> that control the HTTP protocol
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent provider. Environment variables below that don't specify specific values
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent are enabled when set to any value.</p>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent <dl>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent <dt>proxy-sendextracrlf</dt>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent <dd>Causes proxy to send an extra CR-LF newline on the end of a
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent request. This is a workaround for a bug in some browsers.</dd>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent <dt>force-proxy-request-1.0</dt>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent <dd>Forces the proxy to send requests to the backend as HTTP/1.0
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent and disables HTTP/1.1 features.</dd>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent <dt>proxy-nokeepalive</dt>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent <dd>Forces the proxy to close the backend connection after
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent each request.</dd>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent <dt>proxy-chain-auth</dt>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent <dd>If the proxy requires authentication, it will read and
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent consume the proxy authentication credentials sent by the client.
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent With <var>proxy-chain-auth</var> it will <em>also</em> forward
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent the credentials to the next proxy in the chain. This may
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent be necessary if you have a chain of proxies that share
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent authentication information. <strong>Security Warning:</strong>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent Do not set this unless you know you need it, as it forwards
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent sensitive information!</dd>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent <dt>proxy-sendcl</dt>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent <dd>HTTP/1.0 required all HTTP requests that include a body
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent (e.g. POST requests) to include a <var>Content-Length</var>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent header. This environment variable forces the Apache proxy to
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent send this header to the backend server, regardless of what the
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent Client sent to the proxy. It ensures compatibility when
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent proxying for an HTTP/1.0 or unknown backend. However, it
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent may require the entire request to be buffered by the proxy,
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent so it becomes very inefficient for large requests.</dd>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent <dt>proxy-sendchunks or proxy-sendchunked</dt>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent <dd>This is the opposite of <var>proxy-sendcl</var>. It allows
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent request bodies to be sent to the backend using chunked transfer
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent encoding. This allows the request to be efficiently streamed,
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent but requires that the backend server supports HTTP/1.1.</dd>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent <dt>proxy-interim-response</dt>
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent <dd>This variable takes values <code>RFC</code> (the default) or
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent <code>Suppress</code>. Earlier httpd versions would suppress
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent HTTP interim (1xx) responses sent from the backend. This is
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent technically a violation of the HTTP protocol. In practice,
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent if a backend sends an interim response, it may itself be
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent extending the protocol in a manner we know nothing about,
ac0d91b16ffcc7d2e0adc288dfc92e58728a27ebjason vincent or just broken. So this is now configurable: set
<code>proxy-interim-response RFC</code> to be fully protocol
compliant, or <code>proxy-interim-response Suppress</code>
to suppress interim responses.</dd>
<dt>proxy-initial-not-pooled</dt>
<dd>If this variable is set, no pooled connection will be reused
if the client request is the initial request on the frontend connection. This avoids
the "proxy: error reading status line from remote server" error message
caused by the race condition that the backend server closed the
pooled connection after the connection check by the proxy and
before data sent by the proxy reached the backend. It has to be
kept in mind that setting this variable downgrades performance,
especially with HTTP/1.0 clients.
</dd>
</dl>
</section>
<section id="notes"><title>Request notes</title>
<p><module>mod_proxy_http</module> creates the following request notes for
logging using the <code>%{VARNAME}n</code> format in
<directive module="mod_log_config">LogFormat</directive> or
<directive module="core">ErrorLogFormat</directive>:
</p>
<dl>
<dt>proxy-source-port</dt>
<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>
</section>
</modulesynopsis>