Commit 77d6039c authored by Ken Coar's avatar Ken Coar
Browse files

A truly mighty mod normalising HTML tags to uppercase, and

	'i' and 'b' to 'EM' and 'STRONG' respectively.  Been threatening
	to do this for months.. no-one need try to maintain this when
	writing/modifiying the docs.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@80021 13f79535-47bb-0310-9956-ffa450edef68
parent eaeb52c6
Loading
Loading
Loading
Loading
+36 −36
Changes for docs/manual/bind.html: 36 added lines, 36 removed lines.
Original line number Diff line number Diff line
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html><head>
<title>Setting which addresses and ports Apache uses</title>
</head>
<HTML><HEAD>
<TITLE>Setting which addresses and ports Apache uses</TITLE>
</HEAD>

<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
<BODY
@@ -12,71 +12,71 @@
 ALINK="#FF0000"
>
<!--#include virtual="header.html" -->
<h1 ALIGN="CENTER">Setting which addresses and ports Apache uses</h1>
<h1 ALIGN="CENTER">Setting which addresses and ports Apache uses</H1>

<hr>
<HR>

When Apache starts, it connects to some port and address on the
local machine and waits for incoming requests. By default, it
listens to all addresses on the machine, and to the port
as specified by the <tt>Port</tt> directive in the server configuration.
as specified by the <TT>Port</TT> directive in the server configuration.
However, it can be told to listen to more the one port, or to listen
to only selected addresses, or a combination. This is often combined
with the Virtual Host feature which determines how Apache
responds to different IP addresses, hostnames and ports.<p>
responds to different IP addresses, hostnames and ports.<P>

There are two directives used to restrict or specify which addresses
and ports Apache listens to.

<ul>
<li><a href="#bindaddress">BindAddress</a> is used to restrict the server to listening to
<UL>
<LI><A HREF="#bindaddress">BindAddress</A> is used to restrict the server to listening to
  a single address, and can be used to permit multiple Apache servers
  on the same machine listening to different IP addresses.
<li><a href="#listen">Listen</a> can be used to make a single Apache server listen
<LI><A HREF="#listen">Listen</A> can be used to make a single Apache server listen
  to more than one address and/or port.
</ul>
</UL>

<h3><a name="bindaddress">BindAddress</a></h3>
<strong>Syntax:</strong> BindAddress <em>[ * | IP-address | hostname ]</em><br>
<strong>Default:</strong> <code>BindAddress *</code><br>
<strong>Context:</strong> server config<br>
<strong>Status:</strong> Core<p>
<h3><A name="bindaddress">BindAddress</A></h3>
<STRONG>Syntax:</STRONG> BindAddress <EM>[ * | IP-address | hostname ]</EM><BR>
<STRONG>Default:</STRONG> <CODE>BindAddress *</CODE><BR>
<STRONG>Context:</STRONG> server config<BR>
<STRONG>Status:</STRONG> Core<P>

Makes the server listen to just the specified address. If the argument
is *, the server listens to all addresses. The port listened to
is set with the <tt>Port</tt> directive. Only one BindAddress
is set with the <TT>Port</TT> directive. Only one BindAddress
should be used.

<h3><a name="listen">Listen</a></h3>
<strong>Syntax:</strong> Listen <em>[ port | IP-address:port ]</em><br>
<strong>Default:</strong> <code>none</code><br>
<strong>Context:</strong> server config<br>
<strong>Status:</strong> Core<p>
<h3><A name="listen">Listen</A></h3>
<STRONG>Syntax:</STRONG> Listen <EM>[ port | IP-address:port ]</EM><BR>
<STRONG>Default:</STRONG> <CODE>none</CODE><BR>
<STRONG>Context:</STRONG> server config<BR>
<STRONG>Status:</STRONG> Core<P>

<tt>Listen</tt> can be used instead of <tt>BindAddress</tt> and
<tt>Port</tt>. It tells the server to accept incoming requests on the
<TT>Listen</TT> can be used instead of <TT>BindAddress</TT> and
<TT>Port</TT>. It tells the server to accept incoming requests on the
specified port or address-and-port combination. If the first format is
used, with a port number only, the server listens to the given port on
all interfaces, instead of the port given by the <tt>Port</tt>
all interfaces, instead of the port given by the <TT>Port</TT>
directive. If an IP address is given as well as a port, the server
will listen on the given port and interface.  <p> Multiple Listen
will listen on the given port and interface.  <P> Multiple Listen
directives may be used to specify a number of addresses and ports to
listen to. The server will respond to requests from any of the listed
addresses and ports.<p>
addresses and ports.<P>

For example, to make the server accept connections on both port
80 and port 8000, use:
<pre>
<PRE>
   Listen 80
   Listen 8000
</pre>
</PRE>

To make the server accept connections on two specified
interfaces and port numbers, use
<pre>
<PRE>
   Listen 192.170.2.1:80
   Listen 192.170.2.5:8000
</pre>
</PRE>

<h2>How this works with Virtual Hosts</h2>

@@ -95,12 +95,12 @@ not listening to, it cannot be accessed.
<h2>See also</h2>

See also the documentation on
<a href="vhosts/index.html">Virtual Hosts</a>,
<a href="mod/core.html#bindaddress">BindAddress directive</a>,
<a href="mod/core.html#port">Port directive</a>,
<a href="dns-caveats.html">DNS Issues</a>
<A HREF="vhosts/index.html">Virtual Hosts</A>,
<A HREF="mod/core.html#bindaddress">BindAddress directive</A>,
<A HREF="mod/core.html#port">Port directive</A>,
<A HREF="dns-caveats.html">DNS Issues</A>
and
<a href="mod/core.html#virtualhost">&lt;VirtualHost&gt; section</a>.
<A HREF="mod/core.html#virtualhost">&lt;VirtualHost&gt; section</A>.

<!--#include virtual="footer.html" -->
</BODY>
+36 −36
Changes for docs/manual/bind.html.en: 36 added lines, 36 removed lines.
Original line number Diff line number Diff line
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html><head>
<title>Setting which addresses and ports Apache uses</title>
</head>
<HTML><HEAD>
<TITLE>Setting which addresses and ports Apache uses</TITLE>
</HEAD>

<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
<BODY
@@ -12,71 +12,71 @@
 ALINK="#FF0000"
>
<!--#include virtual="header.html" -->
<h1 ALIGN="CENTER">Setting which addresses and ports Apache uses</h1>
<h1 ALIGN="CENTER">Setting which addresses and ports Apache uses</H1>

<hr>
<HR>

When Apache starts, it connects to some port and address on the
local machine and waits for incoming requests. By default, it
listens to all addresses on the machine, and to the port
as specified by the <tt>Port</tt> directive in the server configuration.
as specified by the <TT>Port</TT> directive in the server configuration.
However, it can be told to listen to more the one port, or to listen
to only selected addresses, or a combination. This is often combined
with the Virtual Host feature which determines how Apache
responds to different IP addresses, hostnames and ports.<p>
responds to different IP addresses, hostnames and ports.<P>

There are two directives used to restrict or specify which addresses
and ports Apache listens to.

<ul>
<li><a href="#bindaddress">BindAddress</a> is used to restrict the server to listening to
<UL>
<LI><A HREF="#bindaddress">BindAddress</A> is used to restrict the server to listening to
  a single address, and can be used to permit multiple Apache servers
  on the same machine listening to different IP addresses.
<li><a href="#listen">Listen</a> can be used to make a single Apache server listen
<LI><A HREF="#listen">Listen</A> can be used to make a single Apache server listen
  to more than one address and/or port.
</ul>
</UL>

<h3><a name="bindaddress">BindAddress</a></h3>
<strong>Syntax:</strong> BindAddress <em>[ * | IP-address | hostname ]</em><br>
<strong>Default:</strong> <code>BindAddress *</code><br>
<strong>Context:</strong> server config<br>
<strong>Status:</strong> Core<p>
<h3><A name="bindaddress">BindAddress</A></h3>
<STRONG>Syntax:</STRONG> BindAddress <EM>[ * | IP-address | hostname ]</EM><BR>
<STRONG>Default:</STRONG> <CODE>BindAddress *</CODE><BR>
<STRONG>Context:</STRONG> server config<BR>
<STRONG>Status:</STRONG> Core<P>

Makes the server listen to just the specified address. If the argument
is *, the server listens to all addresses. The port listened to
is set with the <tt>Port</tt> directive. Only one BindAddress
is set with the <TT>Port</TT> directive. Only one BindAddress
should be used.

<h3><a name="listen">Listen</a></h3>
<strong>Syntax:</strong> Listen <em>[ port | IP-address:port ]</em><br>
<strong>Default:</strong> <code>none</code><br>
<strong>Context:</strong> server config<br>
<strong>Status:</strong> Core<p>
<h3><A name="listen">Listen</A></h3>
<STRONG>Syntax:</STRONG> Listen <EM>[ port | IP-address:port ]</EM><BR>
<STRONG>Default:</STRONG> <CODE>none</CODE><BR>
<STRONG>Context:</STRONG> server config<BR>
<STRONG>Status:</STRONG> Core<P>

<tt>Listen</tt> can be used instead of <tt>BindAddress</tt> and
<tt>Port</tt>. It tells the server to accept incoming requests on the
<TT>Listen</TT> can be used instead of <TT>BindAddress</TT> and
<TT>Port</TT>. It tells the server to accept incoming requests on the
specified port or address-and-port combination. If the first format is
used, with a port number only, the server listens to the given port on
all interfaces, instead of the port given by the <tt>Port</tt>
all interfaces, instead of the port given by the <TT>Port</TT>
directive. If an IP address is given as well as a port, the server
will listen on the given port and interface.  <p> Multiple Listen
will listen on the given port and interface.  <P> Multiple Listen
directives may be used to specify a number of addresses and ports to
listen to. The server will respond to requests from any of the listed
addresses and ports.<p>
addresses and ports.<P>

For example, to make the server accept connections on both port
80 and port 8000, use:
<pre>
<PRE>
   Listen 80
   Listen 8000
</pre>
</PRE>

To make the server accept connections on two specified
interfaces and port numbers, use
<pre>
<PRE>
   Listen 192.170.2.1:80
   Listen 192.170.2.5:8000
</pre>
</PRE>

<h2>How this works with Virtual Hosts</h2>

@@ -95,12 +95,12 @@ not listening to, it cannot be accessed.
<h2>See also</h2>

See also the documentation on
<a href="vhosts/index.html">Virtual Hosts</a>,
<a href="mod/core.html#bindaddress">BindAddress directive</a>,
<a href="mod/core.html#port">Port directive</a>,
<a href="dns-caveats.html">DNS Issues</a>
<A HREF="vhosts/index.html">Virtual Hosts</A>,
<A HREF="mod/core.html#bindaddress">BindAddress directive</A>,
<A HREF="mod/core.html#port">Port directive</A>,
<A HREF="dns-caveats.html">DNS Issues</A>
and
<a href="mod/core.html#virtualhost">&lt;VirtualHost&gt; section</a>.
<A HREF="mod/core.html#virtualhost">&lt;VirtualHost&gt; section</A>.

<!--#include virtual="footer.html" -->
</BODY>
+34 −34
Changes for docs/manual/cgi_path.html: 34 added lines, 34 removed lines.
Original line number Diff line number Diff line
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html><head>
<title>PATH_INFO Changes in the CGI Environment</title>
</head>
<HTML><HEAD>
<TITLE>PATH_INFO Changes in the CGI Environment</TITLE>
</HEAD>

<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
<BODY
@@ -12,80 +12,80 @@
 ALINK="#FF0000"
>
<!--#include virtual="header.html" -->
<h1 ALIGN="CENTER">PATH_INFO Changes in the CGI Environment</h1>
<h1 ALIGN="CENTER">PATH_INFO Changes in the CGI Environment</H1>

<hr>
<HR>

<h2><a name="over">Overview</a></h2>
<h2><A name="over">Overview</A></h2>

<p>As implemented in Apache 1.1.1 and earlier versions, the method
<P>As implemented in Apache 1.1.1 and earlier versions, the method
Apache used to create PATH_INFO in the CGI environment was
counterintuitive, and could result in crashes in certain cases. In
Apache 1.2 and beyond, this behavior has changed. Although this
results in some compatibility problems with certain legacy CGI
applications, the Apache 1.2 behavior is still compatible with the
CGI/1.1 specification, and CGI scripts can be easily modified (<a
href="#compat">see below</a>).
CGI/1.1 specification, and CGI scripts can be easily modified (<A
HREF="#compat">see below</A>).

<h2><a name="prob">The Problem</a></h2>
<h2><A name="prob">The Problem</A></h2>

<p>Apache 1.1.1 and earlier implemented the PATH_INFO and SCRIPT_NAME
<P>Apache 1.1.1 and earlier implemented the PATH_INFO and SCRIPT_NAME
environment variables by looking at the filename, not the URL. While
this resulted in the correct values in many cases, when the filesystem
path was overloaded to contain path information, it could result in
errant behavior. For example, if the following appeared in a config
file:
<pre>
<PRE>
     Alias /cgi-ralph /usr/local/httpd/cgi-bin/user.cgi/ralph
</pre>
<p>In this case, <code>user.cgi</code> is the CGI script, the "/ralph"
</PRE>
<P>In this case, <CODE>user.cgi</CODE> is the CGI script, the "/ralph"
is information to be passed onto the CGI. If this configuration was in
place, and a request came for "<code>/cgi-ralph/script/</code>", the
code would set PATH_INFO to "<code>/ralph/script</code>", and
SCRIPT_NAME to "<code>/cgi-</code>". Obviously, the latter is
place, and a request came for "<CODE>/cgi-ralph/script/</CODE>", the
code would set PATH_INFO to "<CODE>/ralph/script</CODE>", and
SCRIPT_NAME to "<CODE>/cgi-</CODE>". Obviously, the latter is
incorrect. In certain cases, this could even cause the server to
crash.</p>
crash.</P>

<h2><a name="solution">The Solution</a></h2>
<h2><A name="solution">The Solution</A></h2>

<p>Apache 1.2 and later now determine SCRIPT_NAME and PATH_INFO by
<P>Apache 1.2 and later now determine SCRIPT_NAME and PATH_INFO by
looking directly at the URL, and determining how much of the URL is
client-modifiable, and setting PATH_INFO to it. To use the above
example, PATH_INFO would be set to "<code>/script</code>", and
SCRIPT_NAME to "<code>/cgi-ralph</code>". This makes sense and results
example, PATH_INFO would be set to "<CODE>/script</CODE>", and
SCRIPT_NAME to "<CODE>/cgi-ralph</CODE>". This makes sense and results
in no server behavior problems. It also permits the script to be
guaranteed that
"<code>http://$SERVER_NAME:$SERVER_PORT$SCRIPT_NAME$PATH_INFO</code>"
"<CODE>http://$SERVER_NAME:$SERVER_PORT$SCRIPT_NAME$PATH_INFO</CODE>"
will always be an accessible URL that points to the current script,
something which was not necessarily true with previous versions of
Apache.

<p>However, the "<code>/ralph</code>"
information from the <code>Alias</code> directive is lost. This is
<P>However, the "<CODE>/ralph</CODE>"
information from the <CODE>Alias</CODE> directive is lost. This is
unfortunate, but we feel that using the filesystem to pass along this
sort of information is not a recommended method, and a script making
use of it "deserves" not to work. Apache 1.2b3 and later, however, do
provide <a href="#compat">a workaround.</a>
provide <A HREF="#compat">a workaround.</A>

<h2><a name="compat">Compatibility with Previous Servers</a></h2>
<h2><A name="compat">Compatibility with Previous Servers</A></h2>

<p>It may be necessary for a script that was designed for earlier
<P>It may be necessary for a script that was designed for earlier
versions of Apache or other servers to need the information that the
old PATH_INFO variable provided. For this purpose, Apache 1.2 (1.2b3
and later) sets an additional variable, FILEPATH_INFO. This
environment variable contains the value that PATH_INFO would have had
with Apache 1.1.1.</p>
with Apache 1.1.1.</P>

<p>A script that wishes to work with both Apache 1.2 and earlier
<P>A script that wishes to work with both Apache 1.2 and earlier
versions can simply test for the existence of FILEPATH_INFO, and use
it if available. Otherwise, it can use PATH_INFO. For example, in
Perl, one might use:
<pre>
<PRE>
    $path_info = $ENV{'FILEPATH_INFO'} || $ENV{'PATH_INFO'};
</pre>
</PRE>

<p>By doing this, a script can work with all servers supporting the
CGI/1.1 specification, including all versions of Apache.</p>
<P>By doing this, a script can work with all servers supporting the
CGI/1.1 specification, including all versions of Apache.</P>

<!--#include virtual="footer.html" -->
</BODY>
+34 −34
Changes for docs/manual/cgi_path.html.en: 34 added lines, 34 removed lines.
Original line number Diff line number Diff line
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html><head>
<title>PATH_INFO Changes in the CGI Environment</title>
</head>
<HTML><HEAD>
<TITLE>PATH_INFO Changes in the CGI Environment</TITLE>
</HEAD>

<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
<BODY
@@ -12,80 +12,80 @@
 ALINK="#FF0000"
>
<!--#include virtual="header.html" -->
<h1 ALIGN="CENTER">PATH_INFO Changes in the CGI Environment</h1>
<h1 ALIGN="CENTER">PATH_INFO Changes in the CGI Environment</H1>

<hr>
<HR>

<h2><a name="over">Overview</a></h2>
<h2><A name="over">Overview</A></h2>

<p>As implemented in Apache 1.1.1 and earlier versions, the method
<P>As implemented in Apache 1.1.1 and earlier versions, the method
Apache used to create PATH_INFO in the CGI environment was
counterintuitive, and could result in crashes in certain cases. In
Apache 1.2 and beyond, this behavior has changed. Although this
results in some compatibility problems with certain legacy CGI
applications, the Apache 1.2 behavior is still compatible with the
CGI/1.1 specification, and CGI scripts can be easily modified (<a
href="#compat">see below</a>).
CGI/1.1 specification, and CGI scripts can be easily modified (<A
HREF="#compat">see below</A>).

<h2><a name="prob">The Problem</a></h2>
<h2><A name="prob">The Problem</A></h2>

<p>Apache 1.1.1 and earlier implemented the PATH_INFO and SCRIPT_NAME
<P>Apache 1.1.1 and earlier implemented the PATH_INFO and SCRIPT_NAME
environment variables by looking at the filename, not the URL. While
this resulted in the correct values in many cases, when the filesystem
path was overloaded to contain path information, it could result in
errant behavior. For example, if the following appeared in a config
file:
<pre>
<PRE>
     Alias /cgi-ralph /usr/local/httpd/cgi-bin/user.cgi/ralph
</pre>
<p>In this case, <code>user.cgi</code> is the CGI script, the "/ralph"
</PRE>
<P>In this case, <CODE>user.cgi</CODE> is the CGI script, the "/ralph"
is information to be passed onto the CGI. If this configuration was in
place, and a request came for "<code>/cgi-ralph/script/</code>", the
code would set PATH_INFO to "<code>/ralph/script</code>", and
SCRIPT_NAME to "<code>/cgi-</code>". Obviously, the latter is
place, and a request came for "<CODE>/cgi-ralph/script/</CODE>", the
code would set PATH_INFO to "<CODE>/ralph/script</CODE>", and
SCRIPT_NAME to "<CODE>/cgi-</CODE>". Obviously, the latter is
incorrect. In certain cases, this could even cause the server to
crash.</p>
crash.</P>

<h2><a name="solution">The Solution</a></h2>
<h2><A name="solution">The Solution</A></h2>

<p>Apache 1.2 and later now determine SCRIPT_NAME and PATH_INFO by
<P>Apache 1.2 and later now determine SCRIPT_NAME and PATH_INFO by
looking directly at the URL, and determining how much of the URL is
client-modifiable, and setting PATH_INFO to it. To use the above
example, PATH_INFO would be set to "<code>/script</code>", and
SCRIPT_NAME to "<code>/cgi-ralph</code>". This makes sense and results
example, PATH_INFO would be set to "<CODE>/script</CODE>", and
SCRIPT_NAME to "<CODE>/cgi-ralph</CODE>". This makes sense and results
in no server behavior problems. It also permits the script to be
guaranteed that
"<code>http://$SERVER_NAME:$SERVER_PORT$SCRIPT_NAME$PATH_INFO</code>"
"<CODE>http://$SERVER_NAME:$SERVER_PORT$SCRIPT_NAME$PATH_INFO</CODE>"
will always be an accessible URL that points to the current script,
something which was not necessarily true with previous versions of
Apache.

<p>However, the "<code>/ralph</code>"
information from the <code>Alias</code> directive is lost. This is
<P>However, the "<CODE>/ralph</CODE>"
information from the <CODE>Alias</CODE> directive is lost. This is
unfortunate, but we feel that using the filesystem to pass along this
sort of information is not a recommended method, and a script making
use of it "deserves" not to work. Apache 1.2b3 and later, however, do
provide <a href="#compat">a workaround.</a>
provide <A HREF="#compat">a workaround.</A>

<h2><a name="compat">Compatibility with Previous Servers</a></h2>
<h2><A name="compat">Compatibility with Previous Servers</A></h2>

<p>It may be necessary for a script that was designed for earlier
<P>It may be necessary for a script that was designed for earlier
versions of Apache or other servers to need the information that the
old PATH_INFO variable provided. For this purpose, Apache 1.2 (1.2b3
and later) sets an additional variable, FILEPATH_INFO. This
environment variable contains the value that PATH_INFO would have had
with Apache 1.1.1.</p>
with Apache 1.1.1.</P>

<p>A script that wishes to work with both Apache 1.2 and earlier
<P>A script that wishes to work with both Apache 1.2 and earlier
versions can simply test for the existence of FILEPATH_INFO, and use
it if available. Otherwise, it can use PATH_INFO. For example, in
Perl, one might use:
<pre>
<PRE>
    $path_info = $ENV{'FILEPATH_INFO'} || $ENV{'PATH_INFO'};
</pre>
</PRE>

<p>By doing this, a script can work with all servers supporting the
CGI/1.1 specification, including all versions of Apache.</p>
<P>By doing this, a script can work with all servers supporting the
CGI/1.1 specification, including all versions of Apache.</P>

<!--#include virtual="footer.html" -->
</BODY>
+194 −194

File changed.

Preview size limit exceeded, changes collapsed.

Loading