Commit 659ecd06 authored by No Author's avatar No Author
Browse files

This commit was manufactured by cvs2svn to create branch 'dgaudet'.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/dgaudet@83344 13f79535-47bb-0310-9956-ffa450edef68
parent 86317227
Loading
Loading
Loading
Loading

build/binbuild.sh

deleted100755 → 0
+0 −294
Original line number Diff line number Diff line
#!/bin/sh
#
# binbuild.sh - Builds an Apache binary distribution.
# Initially written by Lars Eilebrecht <lars@apache.org>.
#
# This script falls under the Apache License.
# See http://www.apache.org/docs/LICENSE


CONFIGPARAM="--with-layout=BinaryDistribution --enable-module=most --enable-shared=max"
APDIR=`pwd`
APDIR=`basename $APDIR`
VER=`echo $APDIR |sed s/apache_//`
OS=`src/helpers/GuessOS`
TAR="`src/helpers/PrintPath tar`"
GTAR="`src/helpers/PrintPath gtar`"
GZIP="`src/helpers/PrintPath gzip`"

if [ x$1 != x ]
then
  USER=$1
else
  USER="`src/helpers/buildinfo.sh -n %u@%h%d`"
fi

if [ ! -f ./ABOUT_APACHE ]
then
  echo "ERROR: The current directory contains no valid Apache distribution."
  echo "Please change the directory to the top level directory of a freshly"
  echo "unpacked Apache 1.3 source distribution and re-execute the script"
  echo "'./src/helpers/bindbuild.sh'." 
  exit 1;
fi

if [ -d ./CVS ]
then
  echo "ERROR: The current directory is a CVS checkout of Apache."
  echo "Only a standard Apache 1.3 source distribution should be used to"
  echo "create a binary distribution."
  exit 1;
fi

echo "Building Apache $VER binary distribution..."
echo "Platform is \"$OS\"..."

( echo "Build log for Apache binary distribution" && \
  echo "----------------------------------------------------------------------" && \
  ./configure $CONFIGPARAM && \
  echo "----------------------------------------------------------------------" && \
  make clean && \
  rm -rf bindist install-bindist.sh *.bindist
  echo "----------------------------------------------------------------------" && \
  make && \
  echo "----------------------------------------------------------------------" && \
  make install-quiet root="bindist/" && \
  echo "----------------------------------------------------------------------" && \
  make clean && \
  echo "----------------------------------------------------------------------" && \
  echo "[EOF]" \
) > build.log 2>&1

if [ ! -f ./bindist/bin/httpd ]
then
  echo "ERROR: Failed to build Apache. See \"build.log\" for details."
  exit 1;
fi

echo "Binary image successfully created..."

./bindist/bin/httpd -v

echo "Creating supplementary files..."

( echo " " && \
  echo "Apache $VER binary distribution" && \
  echo "================================" && \
  echo " " && \
  echo "This binary distribution is usable on a \"$OS\"" && \
  echo "system and was built by \"$USER\"." && \
  echo "" && \
  echo "The distribution contains all standard Apache modules as shared" && \
  echo "objects. This allows you to enable or disable particular modules" && \
  echo "with the LoadModule/AddModule directives in the configuration file" && \
  echo "without the need to re-compile Apache." && \
  echo "" && \
  echo "See \"INSTALL.bindist\" on how to install the distribution." && \
  echo " " && \
  echo "NOTE: Please do not send support-related mails to the address mentioned" && \
  echo "      above or to any member of the Apache Group! Support questions" && \
  echo "      should be directed to the \"comp.infosystems.www.servers.unix\"" && \
  echo "      or \"comp.infosystems.www.servers.ms-windows\" newsgroup" && \
  echo "      (as appropriate for the platform you use), where some of the" && \
  echo "      Apache team lurk, in the company of many other Apache gurus" && \
  echo "      who should be able to help." && \
  echo "      If you think you found a bug in Apache or have a suggestion please" && \
  echo "      visit the bug report page at http://www.apache.org/bug_report.html" && \
  echo " " && \
  echo "----------------------------------------------------------------------" && \
  ./bindist/bin/httpd -V && \
  echo "----------------------------------------------------------------------" \
) > README.bindist
cp README.bindist ../apache_$VER-$OS.README

( echo " " && \
  echo "Apache $VER binary installation" && \
  echo "================================" && \
  echo " " && \
  echo "To install this binary distribution you have to execute the installation" && \
  echo "script \"install-bindist.sh\" in the top-level directory of the distribution." && \
  echo " " && \
  echo "The script takes the ServerRoot directory into which you want to install" && \
  echo "Apache as an option. If you ommit the option the default path" && \
  echo "\"/usr/local/apache\" is used." && \
  echo "Make sure you have write permissions in the target directory, e.g. switch" && \
  echo "to user \"root\" before you execute the script." && \
  echo " " && \
  echo "See \"README.bindist\" for further details about this distribution." && \
  echo " " && \
  echo "Please note that this distribution includes the complete Apache source code." && \
  echo "Therefore you may compile Apache yourself at any time if you have a compiler" && \
  echo "installation on your system." && \
  echo "See \"INSTALL\" for details on how to accomplish this." && \
  echo " " \
) > INSTALL.bindist

( echo "#!/bin/sh" && \
  echo "#" && \
  echo "# Usage: install-bindist.sh [ServerRoot]" && \
  echo "# This script installs the Apache binary distribution and" && \
  echo "# was automatically created by binbuild.sh." && \
  echo " " && \
  echo "lmkdir()" && \
  echo "{" && \
  echo "  path=\"\"" && \
  echo "  dirs=\`echo \$1 | sed -e 's%/% %g'\`" && \
  echo "  mode=\$2" && \
  echo " " && \
  echo "  set -- \${dirs}" && \
  echo " " && \
  echo "  for d in \${dirs}" && \
  echo "  do" && \
  echo "    path=\"\${path}/\$d\"" && \
  echo "    if test ! -d \"\${path}\" ; then" && \
  echo "      mkdir \${path}" && \
  echo "      if test \$? -ne 0 ; then" && \
  echo "        echo \"Failed to create directory: \${path}\"" && \
  echo "        exit 1" && \
  echo "      fi" && \
  echo "      chmod \${mode} \${path}" && \
  echo "    fi" && \
  echo "  done" && \
  echo "}" && \
  echo " " && \
  echo "lcopy()" && \
  echo "{" && \
  echo "  from=\$1" && \
  echo "  to=\$2" && \
  echo "  dmode=\$3" && \
  echo "  fmode=\$4" && \
  echo " " && \
  echo "  test -d \${to} || lmkdir \${to} \${dmode}" && \
  echo "  (cd \${from} && tar -cf - *) | (cd \${to} && tar -xf -)" && \
  echo " " && \
  echo "  if test \"X\${fmode}\" != X ; then" && \
  echo "    find \${to} -type f -print | xargs chmod \${fmode}" && \
  echo "  fi" && \
  echo "  if test \"X\${dmode}\" != X ; then" && \
  echo "    find \${to} -type d -print | xargs chmod \${dmode}" && \
  echo "  fi" && \
  echo "}" && \
  echo " " && \
  echo "##" && \
  echo "##  determine path to (optional) Perl interpreter" && \
  echo "##" && \
  echo "PERL=no-perl5-on-this-system" && \
  echo "perls='perl5 perl'" && \
  echo "path=\`echo \$PATH | sed -e 's/:/ /g'\`" && \
  echo " " && \
  echo "for dir in \${path} ;  do" && \
  echo "  for pperl in \${perls} ; do" && \
  echo "    if test -f \"\${dir}/\${pperl}\" ; then" && \
  echo "      if \`\${dir}/\${pperl} -v | grep 'version 5\.' >/dev/null 2>&1\` ; then" && \
  echo "        PERL=\"\${dir}/\${pperl}\"" && \
  echo "        break" && \
  echo "      fi" && \
  echo "    fi" && \
  echo "  done" && \
  echo "done" && \
  echo " " && \
  echo "if [ .\$1 = . ]" && \
  echo "then" && \
  echo "  SR=/usr/local/apache" && \
  echo "else" && \
  echo "  SR=\$1" && \
  echo "fi" && \
  echo "echo \"Installing binary distribution for platform $OS\"" && \
  echo "echo \"into directory \$SR ...\"" && \
  echo "lmkdir \$SR 755" && \
  echo "lmkdir \$SR/proxy 750" && \
  echo "lmkdir \$SR/logs 750" && \
  echo "lcopy bindist/man \$SR/man 755 644" && \
  echo "lcopy bindist/libexec \$SR/libexec 750 644" && \
  echo "lcopy bindist/include \$SR/include 755 644" && \
  echo "lcopy bindist/icons \$SR/icons 755 644" && \
  echo "lcopy bindist/cgi-bin \$SR/cgi-bin 750 750" && \
  echo "lcopy bindist/bin \$SR/bin 750 750" && \
  echo "if [ -d \$SR/conf ]" && \
  echo "then" && \
  echo "  echo \"[Preserving existing configuration files.]\"" && \
  echo "  cp bindist/conf/*.default \$SR/conf/" && \
  echo "else" && \
  echo "  lcopy bindist/conf \$SR/conf 750 640" && \
  echo "fi" && \
  echo "if [ -d \$SR/htdocs ]" && \
  echo "then" && \
  echo "  echo \"[Preserving existing htdocs directory.]\"" && \
  echo "else" && \
  echo "  lcopy bindist/htdocs \$SR/htdocs 755 644" && \
  echo "fi" && \
  echo " " && \
  echo "sed -e \"s;^#!/.*;#!\$PERL;\" -e \"s;\@prefix\@;\$SR;\" -e \"s;\@sbindir\@;\$SR/bin;\" \\" && \
  echo "	-e \"s;\@libexecdir\@;\$SR/libexec;\" -e \"s;\@includedir\@;\$SR/include;\" \\" && \
  echo "	-e \"s;\@sysconfdir\@;\$SR/conf;\" bindist/bin/apxs > \$SR/bin/apxs" && \
  echo "sed -e \"s;^#!/.*;#!\$PERL;\" bindist/bin/dbmmanage > \$SR/bin/dbmmanage" && \
  echo "sed -e \"s%/usr/local/apache%\$SR/%\" \$SR/conf/httpd.conf.default > \$SR/conf/httpd.conf" && \
  echo "sed -e \"s%PIDFILE=%PIDFILE=\$SR/%\" -e \"s%HTTPD=%HTTPD=\\\"\$SR/%\" -e \"s%httpd\$%httpd -d \$SR\\\"%\" bindist/bin/apachectl > \$SR/bin/apachectl" && \
  echo " " && \
  echo "echo \"Ready.\"" && \
  echo "echo \" +--------------------------------------------------------+\"" && \
  echo "echo \" | You now have successfully installed the Apache $VER   |\"" && \
  echo "echo \" | HTTP server. To verify that Apache actually works      |\"" && \
  echo "echo \" | correctly you should first check the (initially        |\"" && \
  echo "echo \" | created or preserved) configuration files:             |\"" && \
  echo "echo \" |                                                        |\"" && \
  echo "echo \" |   \$SR/conf/httpd.conf\"" && \
  echo "echo \" |                                                        |\"" && \
  echo "echo \" | You should then be able to immediately fire up         |\"" && \
  echo "echo \" | Apache the first time by running:                      |\"" && \
  echo "echo \" |                                                        |\"" && \
  echo "echo \" |   \$SR/bin/apachectl start \"" &&\
  echo "echo \" |                                                        |\"" && \
  echo "echo \" | Thanks for using Apache.       The Apache Group        |\"" && \
  echo "echo \" |                                http://www.apache.org/  |\"" && \
  echo "echo \" +--------------------------------------------------------+\"" && \
  echo "echo \" \"" \
) > install-bindist.sh
chmod 755 install-bindist.sh

sed -e "s%\"/htdocs%\"/usr/local/apache/htdocs%" \
    -e "s%\"/icons%\"/usr/local/apache/icons%" \
    -e "s%\"/cgi-bin%\"/usr/local/apache/cgi-bin%" \
    -e "s%^ServerAdmin.*%ServerAdmin you@your.address%" \
    -e "s%#ServerName.*%#ServerName localhost%" \
    -e "s%Port 8080%Port 80%" \
    bindist/conf/httpd.conf.default > bindist/conf/httpd.conf
cp bindist/conf/httpd.conf bindist/conf/httpd.conf.default

echo "Creating distribution archive and readme file..."
 
if [ ".`grep -i error build.log > /dev/null`" != . ]
then
  echo "ERROR: Failed to build Apache. See \"build.log\" for details."
  exit 1;
else
  if [ "x$GTAR" != "x" ]
  then
    $GTAR -zcf ../apache_$VER-$OS.tar.gz -C .. apache_$VER
  else
    if [ "x$TAR" != "x" ]
    then
      $TAR -cf ../apache_$VER-$OS.tar -C .. apache_$VER
      if [ "x$GZIP" != "x" ]
      then
        $GZIP ../apache_$VER-$OS.tar
      fi
    else
      echo "ERROR: Could not find a 'tar' program!"
      echo "       Please execute the following commands manually:"
      echo "         tar -cf ../apache_$VER-$OS.tar ."
      echo "         gzip ../apache_$VER-$OS.tar"
    fi
  fi

  if [ -f ../apache_$VER-$OS.tar.gz ] && [ -f ../apache_$VER-$OS.README ]
  then
    echo "Ready."
    echo "You can find the binary archive (apache_$VER-$OS.tar.gz)"
    echo "and the readme file (apache_$VER-$OS.README) in the"
    echo "parent directory."
    exit 0;
  else
    exit 1;
  fi
fi

docs/docroot/apache_pb.gif

deleted100644 → 0
−2.27 KiB
Loading image diff...

docs/manual/LICENSE

deleted100644 → 0
+0 −59
Original line number Diff line number Diff line
/* ====================================================================
 * Copyright (c) 1995-1999 The Apache Group.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer. 
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. All advertising materials mentioning features or use of this
 *    software must display the following acknowledgment:
 *    "This product includes software developed by the Apache Group
 *    for use in the Apache HTTP server project (http://www.apache.org/)."
 *
 * 4. The names "Apache Server" and "Apache Group" must not be used to
 *    endorse or promote products derived from this software without
 *    prior written permission. For written permission, please contact
 *    apache@apache.org.
 *
 * 5. Products derived from this software may not be called "Apache"
 *    nor may "Apache" appear in their names without prior written
 *    permission of the Apache Group.
 *
 * 6. Redistributions of any form whatsoever must retain the following
 *    acknowledgment:
 *    "This product includes software developed by the Apache Group
 *    for use in the Apache HTTP server project (http://www.apache.org/)."
 *
 * THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY
 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE APACHE GROUP OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of the Apache Group and was originally based
 * on public domain software written at the National Center for
 * Supercomputing Applications, University of Illinois, Urbana-Champaign.
 * For more information on the Apache Group and the Apache HTTP server
 * project, please see <http://www.apache.org/>.
 *
 */


docs/manual/bind.html

deleted100644 → 0
+0 −135
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>

<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
<BODY
 BGCOLOR="#FFFFFF"
 TEXT="#000000"
 LINK="#0000FF"
 VLINK="#000080"
 ALINK="#FF0000"
>
<!--#include virtual="header.html" -->
<H1 ALIGN="CENTER">Setting which addresses and ports Apache uses</H1>

<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.
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>

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
  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
  to more than one address and/or port.
</UL>

<H3><A NAME="bindaddress">BindAddress</A></H3>
<A
 HREF="mod/directive-dict.html#Syntax"
 REL="Help"
><STRONG>Syntax:</STRONG></A> BindAddress <EM>[ * | IP-address 
 | hostname ]</EM><BR>
<A
 HREF="mod/directive-dict.html#Default"
 REL="Help"
><STRONG>Default:</STRONG></A> <CODE>BindAddress *</CODE><BR>
<A
 HREF="mod/directive-dict.html#Context"
 REL="Help"
><STRONG>Context:</STRONG></A> server config<BR>
<A
 HREF="mod/directive-dict.html#Status"
 REL="Help"
><STRONG>Status:</STRONG></A> 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
should be used.

<H3><A NAME="listen">Listen</A></H3>
<A
 HREF="mod/directive-dict.html#Syntax"
 REL="Help"
><STRONG>Syntax:</STRONG></A> Listen <EM>[ port | IP-address:port ]</EM><BR>
<A
 HREF="mod/directive-dict.html#Default"
 REL="Help"
><STRONG>Default:</STRONG></A> <CODE>none</CODE><BR>
<A
 HREF="mod/directive-dict.html#Context"
 REL="Help"
><STRONG>Context:</STRONG></A> server config<BR>
<A
 HREF="mod/directive-dict.html#Status"
 REL="Help"
><STRONG>Status:</STRONG></A> 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
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>
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
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>

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

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

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

BindAddress and Listen do not implement Virtual Hosts. They tell the
main server what addresses and ports to listen to.  If no
&lt;VirtualHost&gt; directives are used, the server will behave the
same for all accepted requests. However, &lt;VirtualHost&gt; can be
used to specify a different behavior for one or more of the addresses
and ports. To implement a VirtualHost, the server must first be told
to listen to the address and port to be used. Then a
&lt;VirtualHost&gt; section should be created for a specified address
and port to set the behavior of this virtual host. Note that if the
&lt;VirtualHost&gt; is set for an address and port that the server is
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>
and
<A HREF="mod/core.html#virtualhost">&lt;VirtualHost&gt; section</A>.

<!--#include virtual="footer.html" -->
</BODY>
</HTML>

docs/manual/bind.html.en

deleted100644 → 0
+0 −135
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>

<!-- Background white, links blue (unvisited), navy (visited), red (active) -->
<BODY
 BGCOLOR="#FFFFFF"
 TEXT="#000000"
 LINK="#0000FF"
 VLINK="#000080"
 ALINK="#FF0000"
>
<!--#include virtual="header.html" -->
<H1 ALIGN="CENTER">Setting which addresses and ports Apache uses</H1>

<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.
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>

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
  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
  to more than one address and/or port.
</UL>

<H3><A NAME="bindaddress">BindAddress</A></H3>
<A
 HREF="mod/directive-dict.html#Syntax"
 REL="Help"
><STRONG>Syntax:</STRONG></A> BindAddress <EM>[ * | IP-address 
 | hostname ]</EM><BR>
<A
 HREF="mod/directive-dict.html#Default"
 REL="Help"
><STRONG>Default:</STRONG></A> <CODE>BindAddress *</CODE><BR>
<A
 HREF="mod/directive-dict.html#Context"
 REL="Help"
><STRONG>Context:</STRONG></A> server config<BR>
<A
 HREF="mod/directive-dict.html#Status"
 REL="Help"
><STRONG>Status:</STRONG></A> 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
should be used.

<H3><A NAME="listen">Listen</A></H3>
<A
 HREF="mod/directive-dict.html#Syntax"
 REL="Help"
><STRONG>Syntax:</STRONG></A> Listen <EM>[ port | IP-address:port ]</EM><BR>
<A
 HREF="mod/directive-dict.html#Default"
 REL="Help"
><STRONG>Default:</STRONG></A> <CODE>none</CODE><BR>
<A
 HREF="mod/directive-dict.html#Context"
 REL="Help"
><STRONG>Context:</STRONG></A> server config<BR>
<A
 HREF="mod/directive-dict.html#Status"
 REL="Help"
><STRONG>Status:</STRONG></A> 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
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>
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
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>

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

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

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

BindAddress and Listen do not implement Virtual Hosts. They tell the
main server what addresses and ports to listen to.  If no
&lt;VirtualHost&gt; directives are used, the server will behave the
same for all accepted requests. However, &lt;VirtualHost&gt; can be
used to specify a different behavior for one or more of the addresses
and ports. To implement a VirtualHost, the server must first be told
to listen to the address and port to be used. Then a
&lt;VirtualHost&gt; section should be created for a specified address
and port to set the behavior of this virtual host. Note that if the
&lt;VirtualHost&gt; is set for an address and port that the server is
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>
and
<A HREF="mod/core.html#virtualhost">&lt;VirtualHost&gt; section</A>.

<!--#include virtual="footer.html" -->
</BODY>
</HTML>
Loading