137 lines
7.3 KiB
HTML
137 lines
7.3 KiB
HTML
<!-- BeginDsi "dsi/head.html" -->
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>Embedthis Appweb 4.3.4 Documentation</title>
|
|
<meta name="keywords" content="embedded web server, web server software, embedded HTTP, application web server,
|
|
embedded server, small web server, HTTP server, library web server, library HTTP, HTTP library" />
|
|
<meta name="description" content="Embedthis Sofware provides commercial and open source embedded web servers for
|
|
devices and applications." />
|
|
<meta name="robots" content="index,follow" />
|
|
<link href="../../../doc.css" rel="stylesheet" type="text/css" />
|
|
<link href="../../../print.css" rel="stylesheet" type="text/css" media="print"/>
|
|
<!--[if IE]>
|
|
<link href="../../../iehacks.css" rel="stylesheet" type="text/css" />
|
|
<![endif]-->
|
|
<link href="http://www.google.com/cse/style/look/default.css" type="text/css" rel="stylesheet" />
|
|
</head>
|
|
|
|
<body>
|
|
<div class="top">
|
|
<a class="logo" href="http://appwebserver.org/"> </a>
|
|
<div class="topRight">
|
|
<div class="search">
|
|
<div id="cse-search-form"></div>
|
|
<div class="version">Embedthis Appweb 4.3.4</div>
|
|
</div>
|
|
</div>
|
|
<div class="crumbs">
|
|
<a href="../../../index.html">Home</a>
|
|
<!-- EndDsi -->
|
|
> <a href="index.html">Users Guide</a> > <b>Ports</b>
|
|
</div>
|
|
</div>
|
|
<div class="content">
|
|
<div class="contentRight">
|
|
|
|
<!-- BeginDsi "dsi/usersGuideSeeAlso.html" -->
|
|
<h1>See Also</h1>
|
|
<ul class="nav">
|
|
<li><a href="../../../guide/appweb/users/index.html">User Guide Overview</a></li>
|
|
<li><a href="../../../guide/appweb/users/configuration.html">Configuring Appweb</a></li>
|
|
<li><a href="../../../guide/appweb/users/ports.html">Ports and Binding</a></li>
|
|
<li><a href="../../../guide/appweb/users/lang.html">Multi-Language Support</a></li>
|
|
<li><a href="../../../guide/appweb/users/authentication.html">User Authorization</a></li>
|
|
<li><a href="../../../guide/appweb/users/logFiles.html">Log Files</a></li>
|
|
<li><a href="../../../guide/appweb/users/vhosts.html">Virtual Hosts</a></li>
|
|
<li><a href="../../../guide/appweb/users/security.html">Security Considerations</a></li>
|
|
<li><a href="../../../guide/appweb/users/ssl.html">SSL</a></li>
|
|
<li><a href="../../../guide/appweb/users/modules.html">Appweb Modules</a></li>
|
|
<li><a href="../../../guide/appweb/users/stages.html">Pipeline Stages</a></li>
|
|
<li><a href="../../../guide/appweb/users/client.html">HTTP Client</a></li>
|
|
<li><a href="../../../guide/appweb/users/webSockets.html">WebSockets</a></li>
|
|
<li><a href="../../../guide/appweb/users/frameworks.html">Web Frameworks</a></li>
|
|
<li><a href="../../../ref/appweb/architecture.html">Appweb Architecture</a></li>
|
|
</ul>
|
|
<!-- EndDsi -->
|
|
</div>
|
|
<div class="contentLeft">
|
|
<h1>Ports and Binding</h1>
|
|
<p>Appweb can listen for HTTP requests on multiple IP addresses and ports. Incoming requests may be served
|
|
by a single server, or they may be processed by different logical servers often called virtual hosts. The
|
|
process of opening TCP/IP ports to listen for requests is called binding. By default, Appweb will listen on
|
|
all the interface network cards in the system, but the Appweb configuration file allows explicit control
|
|
over which interfaces, IP addresses and ports are used.</p>
|
|
<h2 class="section">Listen Directive</h2>
|
|
<p>The <a href="dir/server.html#listen">Listen</a> configuration file directive specifies the IP endpoints
|
|
on which Appweb will listen for incoming HTTP requests. It takes the form:</p>
|
|
<pre>
|
|
Listen [IP][:PORT]
|
|
</pre>
|
|
<p>The IP address and port components are optional, but at least one must be present. If the IP address is
|
|
absent, Appweb will listen on all network interfaces including the loop-back adapter. If the PORT is
|
|
absent, Appweb will listen on the default port which is typically configured to be port 80.</p>For example:
|
|
<pre>
|
|
Listen 80
|
|
Listen 209.108.201.67:8888
|
|
Listen 209.108.201.68
|
|
</pre>
|
|
<h2 class="section">IPv6</h2>
|
|
<p>Appweb will listen on both IPv4 and IPv6 endpoints. To specify IPv6 endpoints you need to use IPv6
|
|
encoding. IPv6 addresses have eight colon separated segments. For example:</p>
|
|
<pre>
|
|
2001:0db8:85a3:08d3:1319:8a2e:0370:7348
|
|
</pre>
|
|
<p>Because IPv6 addresses contain a colon character, you need to enclose the IPv6 address in brackets if
|
|
you want to also specify a network port when using the Listen directive.</p>
|
|
<pre>
|
|
Listen [2001:0db8:85a3:08d3:1319:8a2e:0370:7348]:7777
|
|
</pre>
|
|
<p>This notation is also used in http addresses:</p>
|
|
<pre>
|
|
http://[2001:0db8:85a3:08d3:1319:8a2e:0370:7348]:7777/
|
|
</pre>
|
|
<p>These two documents are useful IPv6 references:</p>
|
|
<ul>
|
|
<li><a href="http://www.enterprisenetworkingplanet.com/netsp/article.php/3633211">Understand IPv6
|
|
Addresses</a></li>
|
|
<li><a href="http://en.wikipedia.org/wiki/IPv6">Wikipedia IPv6</a></li>
|
|
</ul>
|
|
<h2 class="section">Virtual Hosts</h2>
|
|
<p>When a Listen directive is defined inside a Virtual Host, all requests on that endpoint will be managed
|
|
by the directives inside the VirtualHost block. See the <a href=
|
|
"dir/vhost.html#virtualHost">VirtualHost</a> configuration file directive for more information.</p>
|
|
</div>
|
|
</div>
|
|
<!-- BeginDsi "dsi/bottom.html" -->
|
|
<div class="bottom">
|
|
<p class="footnote">
|
|
<a href="../../../product/copyright.html" >© Embedthis Software LLC, 2003-2013.
|
|
All rights reserved. Embedthis, Appweb, ESP, Ejscript and Embedthis GoAhead are trademarks of Embedthis Software LLC.</a>
|
|
</p>
|
|
</div>
|
|
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
|
|
<script type="text/javascript">
|
|
google.load('search', '1', {language : 'en'});
|
|
google.setOnLoadCallback(function() {
|
|
var customSearchControl = new google.search.CustomSearchControl(
|
|
'000262706376373952077:1hs0lhenihk');
|
|
customSearchControl.setResultSetSize(google.search.Search.FILTERED_CSE_RESULTSET);
|
|
var options = new google.search.DrawOptions();
|
|
options.enableSearchboxOnly("http://appwebserver.org/search.html");
|
|
customSearchControl.draw('cse-search-form', options);
|
|
}, true);
|
|
</script>
|
|
<script type="text/javascript">
|
|
var _gaq = _gaq || [];
|
|
_gaq.push(['_setAccount', 'UA-179169-2']);
|
|
_gaq.push(['_trackPageview']);
|
|
(function() {
|
|
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
|
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
|
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
|
})();
|
|
</script>
|
|
</body>
|
|
</html>
|