📄 net-httpd-configuration.html
字号:
<!-- Copyright (C) 2003 Red Hat, Inc. --><!-- This material may be distributed only subject to the terms --><!-- and conditions set forth in the Open Publication License, v1.0 --><!-- or later (the latest version is presently available at --><!-- http://www.opencontent.org/openpub/). --><!-- Distribution of the work or derivative of the work in any --><!-- standard (paper) book form is prohibited unless prior --><!-- permission is obtained from the copyright holder. --><HTML><HEAD><TITLE>Server Configuration</TITLE><meta name="MSSmartTagsPreventParsing" content="TRUE"><METANAME="GENERATOR"CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+"><LINKREL="HOME"TITLE="eCos Reference Manual"HREF="ecos-ref.html"><LINKREL="UP"TITLE="Embedded HTTP Server"HREF="net-httpd-chapter.html"><LINKREL="PREVIOUS"TITLE="Server Organization"HREF="net-httpd-organization.html"><LINKREL="NEXT"TITLE="Support Functions and Macros"HREF="net-httpd-html.html"></HEAD><BODYCLASS="SECT1"BGCOLOR="#FFFFFF"TEXT="#000000"LINK="#0000FF"VLINK="#840084"ALINK="#0000FF"><DIVCLASS="NAVHEADER"><TABLESUMMARY="Header navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><THCOLSPAN="3"ALIGN="center">eCos Reference Manual</TH></TR><TR><TDWIDTH="10%"ALIGN="left"VALIGN="bottom"><AHREF="net-httpd-organization.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="80%"ALIGN="center"VALIGN="bottom">Chapter 48. Embedded HTTP Server</TD><TDWIDTH="10%"ALIGN="right"VALIGN="bottom"><AHREF="net-httpd-html.html"ACCESSKEY="N">Next</A></TD></TR></TABLE><HRALIGN="LEFT"WIDTH="100%"></DIV><DIVCLASS="SECT1"><H1CLASS="SECT1"><ANAME="NET-HTTPD-CONFIGURATION">Server Configuration</H1><P>The HTTP server has a number of configuration options:</P><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN15263"><TTCLASS="LITERAL">CYGNUM_HTTPD_SERVER_PORT</TT></H2><P>This option defines the TCP port that the server will listen on. Itdefaults to the standard HTTP port number 80. It may be changed to adifferent number if, for example, another HTTP server is using themain HTTP port.</P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN15267"><TTCLASS="LITERAL">CYGDAT_HTTPD_SERVER_ID</TT></H2><P>This is the string that is reported to the client in the"Server:" field of the HTTP header. </P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN15271"><TTCLASS="LITERAL">CYGNUM_HTTPD_THREAD_COUNT</TT></H2><P>The HTTP server can be configured to use more than one thread toservice HTTP requests. If you expect to serve complex pages with manyimages or other components that are fetched separately, or if anypages may take a long time to send, then it may be useful to increasethe number of server threads. For most uses, however, the connectionqueuing in the TCP/IP stack and the speed with which each page isgenerated, means that a single thread is usually adequate.</P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN15275"><TTCLASS="LITERAL">CYGNUM_HTTPD_THREAD_PRIORITY</TT></H2><P>The HTTP server threads can be run at any priority. The exact prioritydepends on the importance of the server relative to the rest of thesystem. The default is to put them in the middle of the priority rangeto provide reasonable response without impacting genuine high prioritythreads.</P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN15279"><TTCLASS="LITERAL">CYGNUM_HTTPD_THREAD_STACK_SIZE</TT></H2><P>This is the amount of stack to be allocated for each of the HTTPDthreads. The actual stack size allocated will be this value plus thevalues of <TTCLASS="LITERAL">CYGNUM_HAL_STACK_SIZE_MINIMUM</TT> and<TTCLASS="LITERAL">CYGNUM_HTTPD_SERVER_BUFFER_SIZE</TT>.</P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN15285"><TTCLASS="LITERAL">CYGNUM_HTTPD_SERVER_BUFFER_SIZE</TT></H2><P>This defines the size of the buffer used to receive the first line ofeach HTTP request. If you expect to use particularly long URLs or havevery complex forms, this should be increased.</P></DIV><DIVCLASS="SECT2"><H2CLASS="SECT2"><ANAME="AEN15289"><TTCLASS="LITERAL">CYGNUM_HTTPD_SERVER_DELAY</TT></H2><P>This defines the number of system clock ticks that the HTTP serverwill wait before initializing itself and spawning any extra serverthreads. This is to give the application a chance to initializeproperly without any interference from the HTTPD.</P></DIV></DIV><DIVCLASS="NAVFOOTER"><HRALIGN="LEFT"WIDTH="100%"><TABLESUMMARY="Footer navigation table"WIDTH="100%"BORDER="0"CELLPADDING="0"CELLSPACING="0"><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top"><AHREF="net-httpd-organization.html"ACCESSKEY="P">Prev</A></TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="ecos-ref.html"ACCESSKEY="H">Home</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top"><AHREF="net-httpd-html.html"ACCESSKEY="N">Next</A></TD></TR><TR><TDWIDTH="33%"ALIGN="left"VALIGN="top">Server Organization</TD><TDWIDTH="34%"ALIGN="center"VALIGN="top"><AHREF="net-httpd-chapter.html"ACCESSKEY="U">Up</A></TD><TDWIDTH="33%"ALIGN="right"VALIGN="top">Support Functions and Macros</TD></TR></TABLE></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -