Apache HTTP Server Version 2.4
Description: | Rewrite HTML links in to ensure they are addressable from Clients' networks in a proxy context. |
---|---|
Status: | Base |
Module Identifier: | proxy_html_module |
Source File: | mod_proxy_html.c |
Compatibility: | Version 2.4 and later. Available as a third-party module for earlier 2.x versions |
This module provides an output filter to rewrite HTML links in a
proxy situation, to ensure that links work for users outside the proxy.
It serves the same purpose as Apache's ProxyPassReverse
directive does
for HTTP headers, and is an essential component of a reverse proxy.
For example, if a company has an application server at
appserver.example.com
that is only visible from within
the company's internal network, and a public webserver
www.example.com
, they may wish to provide a gateway to the
application server at http://www.example.com/appserver/
.
When the application server links to itself, those links need to be
rewritten to work through the gateway. mod_proxy_html
serves to rewrite
<a href="http://appserver.example.com/foo/bar.html">foobar</a>
to
<a href="http://www.example.com/appserver/foo/bar.html">foobar</a>
making it accessible from outside.
mod_proxy_html was originally developed at WebÞing, whose extensive documentation may be useful to users.
Description: | Sets the buffer size increment for buffering inline scripts and stylesheets. |
---|---|
Syntax: | ProxyHTMLBufSize bytes |
Default: | ProxyHTMLBufSize 8192 |
Context: | server config, virtual host, directory |
Status: | Base |
Module: | mod_proxy_html |
Compatibility: | Version 2.4 and later; available as a third-party for earlier 2.x versions |
In order to parse non-HTML content (stylesheets and scripts) embedded
in HTML documents, mod_proxy_html
has to read the entire script or stylesheet into a buffer. This buffer will
be expanded as necessary to hold the largest script or stylesheet in a page,
in increments of bytes as set by this directive.
The default is 8192, and will work well for almost all pages. However, if you know you're proxying pages containing stylesheets and/or scripts bigger than 8K (that is, for a single script or stylesheet, NOT in total), it will be more efficient to set a larger buffer size and avoid the need to resize the buffer dynamically during a request.
Description: | Specify a charset for mod_proxy_html output. |
---|---|
Syntax: | ProxyHTMLCharsetOut Charset | * |
Context: | server config, virtual host, directory |