summaryrefslogtreecommitdiff
path: root/docs/manual/bind.html
diff options
context:
space:
mode:
authorpaul <paul@unknown>1996-11-18 19:51:08 +0000
committerpaul <paul@unknown>1996-11-18 19:51:08 +0000
commit2ada5933c85b2ca45770c2df27e2d292667f36c4 (patch)
tree53c64bebbb2a1da979c0ac496b2db09ba38c495d /docs/manual/bind.html
parent71aa1343b0e4001170dbaf0a3b144d7c4028ef7b (diff)
downloadhttpd-2ada5933c85b2ca45770c2df27e2d292667f36c4.tar.gz
New manual setup. This is the current docs for all versions of the
server merged into a single manual. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@76987 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'docs/manual/bind.html')
-rw-r--r--docs/manual/bind.html103
1 files changed, 103 insertions, 0 deletions
diff --git a/docs/manual/bind.html b/docs/manual/bind.html
new file mode 100644
index 0000000000..777f79650f
--- /dev/null
+++ b/docs/manual/bind.html
@@ -0,0 +1,103 @@
+<html><head>
+<title>Setting which addresses and ports Apache uses</title>
+</head><body>
+
+<img src="../images/apache_sub.gif" alt="">
+<h1>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>
+<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
+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>
+
+<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 behavour 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 behaviour 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="virtual-host.html">Virtual Hosts</a>,
+<a href="host.html">Non-IP virtual hosts</a>,
+<a href="core.html#bindaddress">BindAddress directive</a>,
+<a href="core.html#port">Port directive</a>
+and
+<a href="core.html#virtualhost">&lt;VirtualHost&gt; section</a>.
+</ul>
+
+<hr>
+<A HREF="../"><IMG SRC="../images/apache_home.gif" ALT="Home"></A>
+<A HREF="./"><IMG SRC="../images/apache_index.gif" ALT="Index"></A>
+
+</BODY>
+</HTML>
+