Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > 675c8c8167236dfcf8d66da674f931e8 > files > 782

erlang-doc-R15B-03.3.fc17.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns:fn="http://www.w3.org/2005/02/xpath-functions">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../../doc/otp_doc.css" type="text/css">
<title>Erlang -- httpd</title>
</head>
<body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000"><div id="container">
<script id="js" type="text/javascript" language="JavaScript" src="../../../../doc/js/flipmenu/flipmenu.js"></script><script id="js2" type="text/javascript" src="../../../../doc/js/erlresolvelinks.js"></script><script language="JavaScript" type="text/javascript">
            <!--
              function getWinHeight() {
                var myHeight = 0;
                if( typeof( window.innerHeight ) == 'number' ) {
                  //Non-IE
                  myHeight = window.innerHeight;
                } else if( document.documentElement && ( document.documentElement.clientWidth ||
                                                         document.documentElement.clientHeight ) ) {
                  //IE 6+ in 'standards compliant mode'
                  myHeight = document.documentElement.clientHeight;
                } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
                  //IE 4 compatible
                  myHeight = document.body.clientHeight;
                }
                return myHeight;
              }

              function setscrollpos() {
                var objf=document.getElementById('loadscrollpos');
                 document.getElementById("leftnav").scrollTop = objf.offsetTop - getWinHeight()/2;
              }

              function addEvent(obj, evType, fn){
                if (obj.addEventListener){
                obj.addEventListener(evType, fn, true);
                return true;
              } else if (obj.attachEvent){
                var r = obj.attachEvent("on"+evType, fn);
                return r;
              } else {
                return false;
              }
             }

             addEvent(window, 'load', setscrollpos);

             //--></script><div id="leftnav"><div class="innertube">
<img alt="Erlang logo" src="../../../../doc/erlang-logo.png"><br><small><a href="users_guide.html">User's Guide</a><br><a href="index.html">Reference Manual</a><br><a href="release_notes.html">Release Notes</a><br><a href="../pdf/inets-5.9.2.pdf">PDF</a><br><a href="../../../../doc/index.html">Top</a></small><p><strong>inets</strong><br><strong>Reference Manual</strong><br><small>Version 5.9.2</small></p>
<br><a href="javascript:openAllFlips()">Expand All</a><br><a href="javascript:closeAllFlips()">Contract All</a><p><small><strong>Table of Contents</strong></small></p>
<ul class="flipMenu">
<li id="no" title="inets " expanded="false">inets<ul>
<li><a href="inets.html">
                  Top of manual page
                </a></li>
<li title="services-0"><a href="inets.html#services-0">services/0</a></li>
<li title="services_info-0"><a href="inets.html#services_info-0">services_info/0</a></li>
<li title="service_names-0"><a href="inets.html#service_names-0">service_names/0</a></li>
<li title="start-0"><a href="inets.html#start-0">start/0</a></li>
<li title="start-1"><a href="inets.html#start-1">start/1</a></li>
<li title="stop-0"><a href="inets.html#stop-0">stop/0</a></li>
<li title="start-2"><a href="inets.html#start-2">start/2</a></li>
<li title="start-3"><a href="inets.html#start-3">start/3</a></li>
<li title="stop-2"><a href="inets.html#stop-2">stop/2</a></li>
</ul>
</li>
<li id="no" title="ftp " expanded="false">ftp<ul>
<li><a href="ftp.html">
                  Top of manual page
                </a></li>
<li title="account-2"><a href="ftp.html#account-2">account/2</a></li>
<li title="append-2"><a href="ftp.html#append-2">append/2</a></li>
<li title="append-3"><a href="ftp.html#append-3">append/3</a></li>
<li title="append_bin-3"><a href="ftp.html#append_bin-3">append_bin/3</a></li>
<li title="append_chunk-2"><a href="ftp.html#append_chunk-2">append_chunk/2</a></li>
<li title="append_chunk_start-2"><a href="ftp.html#append_chunk_start-2">append_chunk_start/2</a></li>
<li title="append_chunk_end-1"><a href="ftp.html#append_chunk_end-1">append_chunk_end/1</a></li>
<li title="cd-2"><a href="ftp.html#cd-2">cd/2</a></li>
<li title="close-1"><a href="ftp.html#close-1">close/1</a></li>
<li title="delete-2"><a href="ftp.html#delete-2">delete/2</a></li>
<li title="formaterror-1"><a href="ftp.html#formaterror-1">formaterror/1</a></li>
<li title="lcd-2"><a href="ftp.html#lcd-2">lcd/2</a></li>
<li title="lpwd-1"><a href="ftp.html#lpwd-1">lpwd/1</a></li>
<li title="ls-1"><a href="ftp.html#ls-1">ls/1</a></li>
<li title="ls-2"><a href="ftp.html#ls-2">ls/2</a></li>
<li title="mkdir-2"><a href="ftp.html#mkdir-2">mkdir/2</a></li>
<li title="nlist-1"><a href="ftp.html#nlist-1">nlist/1</a></li>
<li title="nlist-2"><a href="ftp.html#nlist-2">nlist/2</a></li>
<li title="open-1"><a href="ftp.html#open-1">open/1</a></li>
<li title="open-2"><a href="ftp.html#open-2">open/2</a></li>
<li title="pwd-1"><a href="ftp.html#pwd-1">pwd/1</a></li>
<li title="pwd-1"><a href="ftp.html#pwd-1">pwd/1</a></li>
<li title="recv-2"><a href="ftp.html#recv-2">recv/2</a></li>
<li title="recv-3"><a href="ftp.html#recv-3">recv/3</a></li>
<li title="recv_bin-2"><a href="ftp.html#recv_bin-2">recv_bin/2</a></li>
<li title="recv_chunk_start-2"><a href="ftp.html#recv_chunk_start-2">recv_chunk_start/2</a></li>
<li title="recv_chunk-1"><a href="ftp.html#recv_chunk-1">recv_chunk/1</a></li>
<li title="rename-3"><a href="ftp.html#rename-3">rename/3</a></li>
<li title="rmdir-2"><a href="ftp.html#rmdir-2">rmdir/2</a></li>
<li title="send-2"><a href="ftp.html#send-2">send/2</a></li>
<li title="send-3"><a href="ftp.html#send-3">send/3</a></li>
<li title="send_bin-3"><a href="ftp.html#send_bin-3">send_bin/3</a></li>
<li title="send_chunk-2"><a href="ftp.html#send_chunk-2">send_chunk/2</a></li>
<li title="send_chunk_start-2"><a href="ftp.html#send_chunk_start-2">send_chunk_start/2</a></li>
<li title="send_chunk_end-1"><a href="ftp.html#send_chunk_end-1">send_chunk_end/1</a></li>
<li title="type-2"><a href="ftp.html#type-2">type/2</a></li>
<li title="user-3"><a href="ftp.html#user-3">user/3</a></li>
<li title="user-4"><a href="ftp.html#user-4">user/4</a></li>
<li title="quote-2"><a href="ftp.html#quote-2">quote/2</a></li>
</ul>
</li>
<li id="no" title="tftp " expanded="false">tftp<ul>
<li><a href="tftp.html">
                  Top of manual page
                </a></li>
<li title="start-1"><a href="tftp.html#start-1">start/1</a></li>
<li title="read_file-3"><a href="tftp.html#read_file-3">read_file/3</a></li>
<li title="write_file-3"><a href="tftp.html#write_file-3">write_file/3</a></li>
<li title="info-1"><a href="tftp.html#info-1">info/1</a></li>
<li title="info-1"><a href="tftp.html#info-1">info/1</a></li>
<li title="info-1"><a href="tftp.html#info-1">info/1</a></li>
<li title="change_config-2"><a href="tftp.html#change_config-2">change_config/2</a></li>
<li title="change_config-2"><a href="tftp.html#change_config-2">change_config/2</a></li>
<li title="change_config-2"><a href="tftp.html#change_config-2">change_config/2</a></li>
<li title="start-0"><a href="tftp.html#start-0">start/0</a></li>
<li title="prepare-6"><a href="tftp.html#prepare-6">prepare/6</a></li>
<li title="open-6"><a href="tftp.html#open-6">open/6</a></li>
<li title="read-1"><a href="tftp.html#read-1">read/1</a></li>
<li title="write-2"><a href="tftp.html#write-2">write/2</a></li>
<li title="abort-3"><a href="tftp.html#abort-3">abort/3</a></li>
<li title="error_msg-2"><a href="tftp.html#error_msg-2">error_msg/2</a></li>
<li title="warning_msg-2"><a href="tftp.html#warning_msg-2">warning_msg/2</a></li>
<li title="info_msg-2"><a href="tftp.html#info_msg-2">info_msg/2</a></li>
</ul>
</li>
<li id="no" title="httpc " expanded="false">httpc<ul>
<li><a href="httpc.html">
                  Top of manual page
                </a></li>
<li title="request-1"><a href="httpc.html#request-1">request/1</a></li>
<li title="request-2"><a href="httpc.html#request-2">request/2</a></li>
<li title="request-4"><a href="httpc.html#request-4">request/4</a></li>
<li title="request-5"><a href="httpc.html#request-5">request/5</a></li>
<li title="cancel_request-1"><a href="httpc.html#cancel_request-1">cancel_request/1</a></li>
<li title="cancel_request-2"><a href="httpc.html#cancel_request-2">cancel_request/2</a></li>
<li title="set_options-1"><a href="httpc.html#set_options-1">set_options/1</a></li>
<li title="set_options-2"><a href="httpc.html#set_options-2">set_options/2</a></li>
<li title="get_options-1"><a href="httpc.html#get_options-1">get_options/1</a></li>
<li title="get_options-2"><a href="httpc.html#get_options-2">get_options/2</a></li>
<li title="stream_next-1"><a href="httpc.html#stream_next-1">stream_next/1</a></li>
<li title="store_cookies-2"><a href="httpc.html#store_cookies-2">store_cookies/2</a></li>
<li title="store_cookies-3"><a href="httpc.html#store_cookies-3">store_cookies/3</a></li>
<li title="cookie_header-1"><a href="httpc.html#cookie_header-1">cookie_header/1</a></li>
<li title="cookie_header-2"><a href="httpc.html#cookie_header-2">cookie_header/2</a></li>
<li title="cookie_header-3"><a href="httpc.html#cookie_header-3">cookie_header/3</a></li>
<li title="reset_cookies-0"><a href="httpc.html#reset_cookies-0">reset_cookies/0</a></li>
<li title="reset_cookies-1"><a href="httpc.html#reset_cookies-1">reset_cookies/1</a></li>
<li title="which_cookies-0"><a href="httpc.html#which_cookies-0">which_cookies/0</a></li>
<li title="which_cookies-1"><a href="httpc.html#which_cookies-1">which_cookies/1</a></li>
<li title="which_sessions-0"><a href="httpc.html#which_sessions-0">which_sessions/0</a></li>
<li title="which_sessions-1"><a href="httpc.html#which_sessions-1">which_sessions/1</a></li>
<li title="info-0"><a href="httpc.html#info-0">info/0</a></li>
<li title="info-1"><a href="httpc.html#info-1">info/1</a></li>
</ul>
</li>
<li id="loadscrollpos" title="httpd " expanded="true">httpd<ul>
<li><a href="httpd.html">
                  Top of manual page
                </a></li>
<li title="info-1"><a href="httpd.html#info-1">info/1</a></li>
<li title="info-2"><a href="httpd.html#info-2">info/2</a></li>
<li title="info-2"><a href="httpd.html#info-2">info/2</a></li>
<li title="info-3"><a href="httpd.html#info-3">info/3</a></li>
<li title="reload_config-2"><a href="httpd.html#reload_config-2">reload_config/2</a></li>
<li title="Module:do-1"><a href="httpd.html#Module:do-1">Module:do/1</a></li>
<li title="Module:load-2"><a href="httpd.html#Module:load-2">Module:load/2</a></li>
<li title="Module:store-2"><a href="httpd.html#Module:store-2">Module:store/2</a></li>
<li title="Module:remove-1"><a href="httpd.html#Module:remove-1">Module:remove/1</a></li>
<li title="parse_query-1"><a href="httpd.html#parse_query-1">parse_query/1</a></li>
</ul>
</li>
<li id="no" title="httpd_conf " expanded="false">httpd_conf<ul>
<li><a href="httpd_conf.html">
                  Top of manual page
                </a></li>
<li title="check_enum-2"><a href="httpd_conf.html#check_enum-2">check_enum/2</a></li>
<li title="clean-1"><a href="httpd_conf.html#clean-1">clean/1</a></li>
<li title="custom_clean-3"><a href="httpd_conf.html#custom_clean-3">custom_clean/3</a></li>
<li title="is_directory-1"><a href="httpd_conf.html#is_directory-1">is_directory/1</a></li>
<li title="is_file-1"><a href="httpd_conf.html#is_file-1">is_file/1</a></li>
<li title="make_integer-1"><a href="httpd_conf.html#make_integer-1">make_integer/1</a></li>
</ul>
</li>
<li id="no" title="httpd_socket " expanded="false">httpd_socket<ul>
<li><a href="httpd_socket.html">
                  Top of manual page
                </a></li>
<li title="deliver-3"><a href="httpd_socket.html#deliver-3">deliver/3</a></li>
<li title="peername-2"><a href="httpd_socket.html#peername-2">peername/2</a></li>
<li title="resolve-0"><a href="httpd_socket.html#resolve-0">resolve/0</a></li>
</ul>
</li>
<li id="no" title="httpd_util " expanded="false">httpd_util<ul>
<li><a href="httpd_util.html">
                  Top of manual page
                </a></li>
<li title="convert_request_date-1"><a href="httpd_util.html#convert_request_date-1">convert_request_date/1</a></li>
<li title="create_etag-1"><a href="httpd_util.html#create_etag-1">create_etag/1</a></li>
<li title="decode_hex-1"><a href="httpd_util.html#decode_hex-1">decode_hex/1</a></li>
<li title="day-1"><a href="httpd_util.html#day-1">day/1</a></li>
<li title="flatlength-1"><a href="httpd_util.html#flatlength-1">flatlength/1</a></li>
<li title="hexlist_to_integer-1"><a href="httpd_util.html#hexlist_to_integer-1">hexlist_to_integer/1</a></li>
<li title="integer_to_hexlist-1"><a href="httpd_util.html#integer_to_hexlist-1">integer_to_hexlist/1</a></li>
<li title="lookup-2"><a href="httpd_util.html#lookup-2">lookup/2</a></li>
<li title="lookup-3"><a href="httpd_util.html#lookup-3">lookup/3</a></li>
<li title="lookup_mime-2"><a href="httpd_util.html#lookup_mime-2">lookup_mime/2</a></li>
<li title="lookup_mime-3"><a href="httpd_util.html#lookup_mime-3">lookup_mime/3</a></li>
<li title="lookup_mime_default-2"><a href="httpd_util.html#lookup_mime_default-2">lookup_mime_default/2</a></li>
<li title="lookup_mime_default-3"><a href="httpd_util.html#lookup_mime_default-3">lookup_mime_default/3</a></li>
<li title="message-3"><a href="httpd_util.html#message-3">message/3</a></li>
<li title="month-1"><a href="httpd_util.html#month-1">month/1</a></li>
<li title="multi_lookup-2"><a href="httpd_util.html#multi_lookup-2">multi_lookup/2</a></li>
<li title="reason_phrase-1"><a href="httpd_util.html#reason_phrase-1">reason_phrase/1</a></li>
<li title="rfc1123_date-0"><a href="httpd_util.html#rfc1123_date-0">rfc1123_date/0</a></li>
<li title="rfc1123_date-2"><a href="httpd_util.html#rfc1123_date-2">rfc1123_date/2</a></li>
<li title="split-3"><a href="httpd_util.html#split-3">split/3</a></li>
<li title="split_script_path-1"><a href="httpd_util.html#split_script_path-1">split_script_path/1</a></li>
<li title="split_path-1"><a href="httpd_util.html#split_path-1">split_path/1</a></li>
<li title="strip-1"><a href="httpd_util.html#strip-1">strip/1</a></li>
<li title="suffix-1"><a href="httpd_util.html#suffix-1">suffix/1</a></li>
</ul>
</li>
<li id="no" title="mod_alias " expanded="false">mod_alias<ul>
<li><a href="mod_alias.html">
                  Top of manual page
                </a></li>
<li title="default_index-2"><a href="mod_alias.html#default_index-2">default_index/2</a></li>
<li title="path-3"><a href="mod_alias.html#path-3">path/3</a></li>
<li title="real_name-3"><a href="mod_alias.html#real_name-3">real_name/3</a></li>
<li title="real_script_name-3"><a href="mod_alias.html#real_script_name-3">real_script_name/3</a></li>
</ul>
</li>
<li id="no" title="mod_auth " expanded="false">mod_auth<ul>
<li><a href="mod_auth.html">
                  Top of manual page
                </a></li>
<li title="add_user-2"><a href="mod_auth.html#add_user-2">add_user/2</a></li>
<li title="add_user-5"><a href="mod_auth.html#add_user-5">add_user/5</a></li>
<li title="add_user-6"><a href="mod_auth.html#add_user-6">add_user/6</a></li>
<li title="delete_user-2"><a href="mod_auth.html#delete_user-2">delete_user/2</a></li>
<li title="delete_user-3"><a href="mod_auth.html#delete_user-3">delete_user/3</a></li>
<li title="delete_user-4"><a href="mod_auth.html#delete_user-4">delete_user/4</a></li>
<li title="get_user-2"><a href="mod_auth.html#get_user-2">get_user/2</a></li>
<li title="get_user-3"><a href="mod_auth.html#get_user-3">get_user/3</a></li>
<li title="get_user-4"><a href="mod_auth.html#get_user-4">get_user/4</a></li>
<li title="list_users-1"><a href="mod_auth.html#list_users-1">list_users/1</a></li>
<li title="list_users-2"><a href="mod_auth.html#list_users-2">list_users/2</a></li>
<li title="list_users-3"><a href="mod_auth.html#list_users-3">list_users/3</a></li>
<li title="add_group_member-3"><a href="mod_auth.html#add_group_member-3">add_group_member/3</a></li>
<li title="add_group_member-4"><a href="mod_auth.html#add_group_member-4">add_group_member/4</a></li>
<li title="add_group_member-5"><a href="mod_auth.html#add_group_member-5">add_group_member/5</a></li>
<li title="delete_group_member-3"><a href="mod_auth.html#delete_group_member-3">delete_group_member/3</a></li>
<li title="delete_group_member-4"><a href="mod_auth.html#delete_group_member-4">delete_group_member/4</a></li>
<li title="delete_group_member-5"><a href="mod_auth.html#delete_group_member-5">delete_group_member/5</a></li>
<li title="list_group_members-2"><a href="mod_auth.html#list_group_members-2">list_group_members/2</a></li>
<li title="list_group_members-3"><a href="mod_auth.html#list_group_members-3">list_group_members/3</a></li>
<li title="list_group_members-4"><a href="mod_auth.html#list_group_members-4">list_group_members/4</a></li>
<li title="list_groups-1"><a href="mod_auth.html#list_groups-1">list_groups/1</a></li>
<li title="list_groups-2"><a href="mod_auth.html#list_groups-2">list_groups/2</a></li>
<li title="list_groups-3"><a href="mod_auth.html#list_groups-3">list_groups/3</a></li>
<li title="delete_group-2"><a href="mod_auth.html#delete_group-2">delete_group/2</a></li>
<li title="delete_group-4"><a href="mod_auth.html#delete_group-4">delete_group/4</a></li>
<li title="update_password-5"><a href="mod_auth.html#update_password-5">update_password/5</a></li>
<li title="update_password-6"><a href="mod_auth.html#update_password-6">update_password/6</a></li>
</ul>
</li>
<li id="no" title="mod_esi " expanded="false">mod_esi<ul>
<li><a href="mod_esi.html">
                  Top of manual page
                </a></li>
<li title="deliver-2"><a href="mod_esi.html#deliver-2">deliver/2</a></li>
<li title="Module:Function-3"><a href="mod_esi.html#Module:Function-3">Module:Function/3</a></li>
<li title="Module:Function-2"><a href="mod_esi.html#Module:Function-2">Module:Function/2</a></li>
</ul>
</li>
<li id="no" title="mod_security " expanded="false">mod_security<ul>
<li><a href="mod_security.html">
                  Top of manual page
                </a></li>
<li title="list_auth_users-1"><a href="mod_security.html#list_auth_users-1">list_auth_users/1</a></li>
<li title="list_auth_users-2"><a href="mod_security.html#list_auth_users-2">list_auth_users/2</a></li>
<li title="list_auth_users-2"><a href="mod_security.html#list_auth_users-2">list_auth_users/2</a></li>
<li title="list_auth_users-3"><a href="mod_security.html#list_auth_users-3">list_auth_users/3</a></li>
<li title="list_blocked_users-1"><a href="mod_security.html#list_blocked_users-1">list_blocked_users/1</a></li>
<li title="list_blocked_users-2"><a href="mod_security.html#list_blocked_users-2">list_blocked_users/2</a></li>
<li title="list_blocked_users-2"><a href="mod_security.html#list_blocked_users-2">list_blocked_users/2</a></li>
<li title="list_blocked_users-3"><a href="mod_security.html#list_blocked_users-3">list_blocked_users/3</a></li>
<li title="block_user-4"><a href="mod_security.html#block_user-4">block_user/4</a></li>
<li title="block_user-5"><a href="mod_security.html#block_user-5">block_user/5</a></li>
<li title="unblock_user-2"><a href="mod_security.html#unblock_user-2">unblock_user/2</a></li>
<li title="unblock_user-3"><a href="mod_security.html#unblock_user-3">unblock_user/3</a></li>
<li title="unblock_user-3"><a href="mod_security.html#unblock_user-3">unblock_user/3</a></li>
<li title="unblock_user-4"><a href="mod_security.html#unblock_user-4">unblock_user/4</a></li>
<li title="event-4"><a href="mod_security.html#event-4">event/4</a></li>
<li title="event-5"><a href="mod_security.html#event-5">event/5</a></li>
</ul>
</li>
<li id="no" title="http_uri " expanded="false">http_uri<ul>
<li><a href="http_uri.html">
                  Top of manual page
                </a></li>
<li title="scheme_defaults-0"><a href="http_uri.html#scheme_defaults-0">scheme_defaults/0</a></li>
<li title="parse-1"><a href="http_uri.html#parse-1">parse/1</a></li>
<li title="parse-2"><a href="http_uri.html#parse-2">parse/2</a></li>
<li title="encode-1"><a href="http_uri.html#encode-1">encode/1</a></li>
<li title="decode-1"><a href="http_uri.html#decode-1">decode/1</a></li>
</ul>
</li>
</ul>
</div></div>
<div id="content">
<div class="innertube">
<!-- refpage --><center><h1>httpd</h1></center>
  
  <h3>MODULE</h3>
<div class="REFBODY">httpd</div> 
  <h3>MODULE SUMMARY</h3>
<div class="REFBODY">An implementation of an HTTP
    1.1 compliant Web server, as defined in RFC 2616.
  </div>
  <h3>DESCRIPTION</h3>
<div class="REFBODY"><p>
    <p>Documents the HTTP server start options, some administrative
      functions and also specifies the Erlang Web server callback
      API</p>
  </p></div>
  
  <h3><a name="id82353">COMMON DATA TYPES </a></h3>
<div class="REFBODY">
    
    <p>Type definitions that are used more than once in
      this module:</p>
    <p><span class="code">boolean() = true | false </span></p>
    <p><span class="code">string() = list of ASCII characters</span></p>
    <p><span class="code">path() = string() - representing a file or directory path.</span></p>
    <p><span class="code"> ip_address() = {N1,N2,N3,N4}  % IPv4
       | {K1,K2,K3,K4,K5,K6,K7,K8}  % IPv6</span></p>
    <p><span class="code">hostname() = string() - representing a host ex "foo.bar.com"</span></p>
    <p><span class="code">property() = atom()</span></p>
    
  </div>

  <h3><a name="id82395">ERLANG HTTP SERVER SERVICE START/STOP </a></h3>
<div class="REFBODY">
    
    <p>A web server can be configured to start when starting the inets
    application or started dynamically in runtime by calling the
    Inets application API <span class="code">inets:start(httpd, ServiceConfig)</span>, or
    <span class="code">inets:start(httpd, ServiceConfig, How)</span>,
    see <span class="bold_code"><a href="inets.html">inets(3)</a></span> Below follows a
    description of the available configuration options, also called
    properties.</p>

    <a name="props_file"></a>
    <p><strong>File properties</strong></p>

    <p>When the web server is started
    at application start time the properties should be fetched from a
    configuration file that could consist of a regular erlang property
    list, e.i.  <span class="code">[{Option, Value}] </span> where <span class="code"> Option = property()
    </span> and <span class="code">Value = term()</span>, followed by a full stop, or for
    backwards compatibility an Apache like configuration file. If the
    web server is started dynamically at runtime you may still specify
    a file but you could also just specify the complete property
    list.</p>
    
    <dl>
      <a name="prop_proplist_file"></a>
      <dt><strong>{proplist_file, path()}</strong></dt>
      <dd>
	<p>If this property is defined inets will expect to find
	all other properties defined in this file. Note that the
	file must include all properties listed under mandatory
	properties. </p>
      </dd>

      <a name="prop_file"></a>
      <dt><strong>{file, path()}</strong></dt>
      <dd> 
	<p>If this property is defined inets will expect to find all 
	other properties defined in this file, that uses Apache like 
	syntax. Note that the file must include all properties listed 
	under mandatory properties. The Apache like syntax is the property, 
	written as one word where each new word begins with a capital, 
	followed by a white-space followed by the value followed by a 
	new line. Ex: </p>

	<div class="example"><pre>
{server_root, "/urs/local/www"} -&gt; ServerRoot /usr/local/www
	</pre></div>
	  
	<p>With a few exceptions, that are documented
	  for each property that behaves differently,
	  and the special case {directory, {path(), PropertyList}} and
	  {security_directory, {Dir, PropertyList}} that are represented
	  as:</p>
	<div class="example"><pre>
	  
&lt;Directory Dir&gt;
 &lt;Properties handled as described above&gt; 
&lt;/Directory&gt;
         
	</pre></div>
      </dd>
    </dl>
    <div class="note">
<div class="label">Note</div>
<div class="content"><p>
      <p>The properties proplist_file and file are mutually exclusive.</p>
    </p></div>
</div>

    <a name="props_mand"></a>
    <p><strong>Mandatory properties</strong></p>
    <dl>
      <a name="prop_port"></a>
      <dt><strong>{port, integer()} </strong></dt>
      <dd> 
	<p>The port that the HTTP server shall listen on.
	If zero is specified as port, an arbitrary available port
	will be picked and you can use the httpd:info/2 function to find
	out which port was picked. </p>
      </dd>

      <a name="prop_server_name"></a>
      <dt><strong>{server_name, string()} </strong></dt>
      <dd>
	<p>The name of your server, normally a fully qualified domain name. </p>
      </dd>

      <a name="prop_server_root"></a>
      <dt><strong>{server_root, path()} </strong></dt>
      <dd> 
	<p>Defines the servers home directory where log files etc can
	be stored. Relative paths specified in other properties refer
	to this directory. </p>
      </dd>

      <a name="prop_doc_root"></a>
      <dt><strong>{document_root, path()}</strong></dt>
      <dd>
	Defines the top directory for the documents that
	are available on the HTTP server.
      </dd>
    </dl>

    <a name="props_comm"></a>
    <p><strong>Communication properties</strong> </p>
    <dl>
      <a name="prop_bind_address"></a>
      <dt><strong>{bind_address, ip_address() | hostname() | any} </strong></dt>
      <dd>
	<p>Defaults to <span class="code">any</span>. Note that <span class="code">any</span> is denoted <strong>*</strong> 
	in the apache like configuration file. </p>
      </dd>

      <a name="prop_socket_type"></a>
      <dt><strong>{socket_type, ip_comm | ssl | essl}</strong></dt>
      <dd>
	<p>When using ssl, there are currently only one alternative. 
	<span class="code">essl</span> specifically uses the Erlang based SSL. 
	<span class="code">ssl</span> defaults to <span class="code">essl</span>. </p>
	<p>Defaults to <span class="code">ip_comm</span>. </p> 
      </dd>

      <a name="prop_ipfamily"></a>
      <dt><strong>{ipfamily, inet | inet6 | inet6fb4}</strong></dt>
      <dd>
	<p>Defaults to <span class="code">inet6fb4. </span> </p>
        <p>Note that this option is only used when the option 
	<span class="code">socket_type</span> has the value <span class="code">ip_comm</span>. </p>
      </dd>
      <a name="prop_minimum_bytes_per_second"></a>
      <dt><strong>{minimum_bytes_per_second, integer()}</strong></dt>
      <dd>
	<p>If given, sets a minimum bytes per second value for connections.</p>
	<p>If the value is not reached, the socket will close for that connection.</p>
	<p>The option is good for reducing the risk of "slow dos" attacks.</p>
      </dd>
    </dl>

    <a name="props_api_modules"></a>
    <p><strong>Erlang Web server API modules</strong> </p>
    <dl>
      <a name="prop_modules"></a>
      <dt><strong>{modules, [atom()]} </strong></dt>
      <dd>
	<p>Defines which modules the HTTP server will use to handle
	requests. Defaults to: <span class="code">[mod_alias, mod_auth, mod_esi,
	mod_actions, mod_cgi, mod_dir, mod_get, mod_head, mod_log,
	mod_disk_log] </span> 
	Note that some mod-modules are dependent on
	others, so the order can not be entirely arbitrary. See the
	<span class="bold_code"><a href="http_server.html"> Inets Web server Modules in the
	Users guide</a></span> for more information. </p>
      </dd>
    </dl>
    
    <a name="props_limit"></a>
    <p><strong>Limit properties</strong> </p>
    <dl>  
      <a name="prop_disable_chunked_encoding"></a>
      <dt><strong>{disable_chunked_transfer_encoding_send, boolean()}</strong></dt>
      <dd> 
	<p>This property allows you to disable chunked
	transfer-encoding when sending a response to a HTTP/1.1
	client, by default this is false. </p>
      </dd>
      
      <a name="prop_keep_alive"></a>
      <dt><strong>{keep_alive, boolean()}</strong></dt>
      <dd>
	<p>Instructs the server whether or not to use persistent
	connections when the client claims to be HTTP/1.1
	compliant, default is true. </p>
      </dd>
      
      <a name="prop_keep_alive_timeout"></a>
      <dt><strong>{keep_alive_timeout, integer()}</strong></dt>
      <dd>
	<p>The number of seconds the server will wait for a
	subsequent request from the client before closing the
	connection. Default is 150. </p>
      </dd>
      
      <a name="prop_max_body_size"></a>
      <dt><strong>{max_body_size, integer()}</strong></dt>
      <dd>
	<p>Limits the size of the message body of HTTP request.
	By the default there is no limit. </p>
      </dd>
      
      <a name="prop_max_clients"></a>
      <dt><strong>{max_clients, integer()}</strong></dt>
      <dd> 
	<p>Limits the number of simultaneous requests that can be
	supported. Defaults to 150. </p>
      </dd>

      <a name="prop_max_header_size"></a>
      <dt><strong>{max_header_size, integer()}</strong></dt>
      <dd>
	<p>Limits the size of the message header of HTTP request.
	Defaults to 10240. </p>
      </dd>
      
      <a name="prop_max_uri"></a>
      <dt><strong>{max_uri, integer()}</strong></dt>
      <dd>
	<p>Limits the size of the HTTP request URI. By
	default there is no limit. </p>
      </dd>
      
      <a name="prop_max_keep_alive_req"></a>
      <dt><strong>{max_keep_alive_requests, integer()}</strong></dt>
      <dd>
	<p>The number of request that a client can do on one
	connection. When the server has responded to the number of
	requests defined by max_keep_alive_requests the server close the
	connection. The server will close it even if there are queued
	request. Defaults to no limit. </p>
      </dd>   
    </dl>
    
    <a name="props_admin"></a>
    <p><strong>Administrative properties</strong></p>
    <dl> 
      <a name="prop_mime_types"></a>
      <dt><strong>{mime_types, [{MimeType, Extension}] | path()}</strong></dt>
      <dd>
	<p>Where MimeType = string() and Extension = string().
	  Files delivered to the client are MIME typed according to RFC
          1590. File suffixes are mapped to MIME types before file delivery.
          The mapping between file suffixes and MIME types can be specified
	  as an Apache like file as well as directly in the property list. Such
          a file may look like:</p>
        <div class="example"><pre>
# MIME type	Extension  
text/html	html htm
text/plain	asc txt
        </pre></div>
	
	<p>Defaults to  [{"html","text/html"},{"htm","text/html"}]</p>
      </dd>

      <a name="prop_mime_type"></a>
      <dt><strong>{mime_type, string()}</strong></dt>
      <dd>
	<p>When the server is asked to provide a document type which
	cannot be determined by the MIME Type Settings, the server will
	use this default type. </p>
      </dd>
  
      <a name="prop_server_admin"></a>
      <dt><strong>{server_admin, string()}</strong></dt>
      <dd>
	<p>ServerAdmin defines the email-address of the server
	administrator, to be included in any error messages returned by
	the server. </p>
      </dd>

      <a name="prop_server_tokens"></a>
      <dt><strong>{server_tokens, prod|major|minor|minimal|os|full|{private, string()}}</strong></dt>
      <dd>
	<p>ServerTokens defines how the value of the server header 
	should look. </p>
	<p>Example: Assuming the version of inets is 5.8.1, 
	here is what the server header string could look like for
	the different values of server-tokens:  </p>
	<div class="example"><pre>
prod                  "inets"
major                 "inets/5"
minor                 "inets/5.8"
minimal               "inets/5.8.1"
os                    "inets/5.8.1 (unix)"
full                  "inets/5.8.1 (unix/linux) OTP/R15B"
{private, "foo/bar"}  "foo/bar"
	</pre></div>
	<p>By default, the value is as before, which is <span class="code">minimal</span>. </p>
      </dd>

      <a name="prop_log_format"></a>
      <dt><strong>{log_format, common | combined}</strong></dt>
      <dd>
	<p>Defines if access logs should be written according to the common
	log format or to the extended common log format.
	The <span class="code">common</span> format is one line that looks like this:
        <span class="code">remotehost rfc931 authuser [date] "request" status bytes</span></p> 

	<div class="example"><pre>
remotehost
	Remote
rfc931
	The client's remote username (RFC 931). 
authuser
	The username with which the user authenticated 
        himself. 
[date]
	Date and time of the request (RFC 1123). 
"request"
	The request line exactly as it came from the client
        (RFC 1945). 
status
	The HTTP status code returned to the client 
        (RFC 1945). 
bytes
	The content-length of the document transferred. 
        </pre></div>

	<p>The <span class="code">combined</span> format is on line that look like this:
	<span class="code">remotehost rfc931 authuser [date] "request" status bytes "referer" "user_agent" </span></p>
	
	<div class="example"><pre>
"referer"
	The url the client was on before
	requesting your url. (If it could not be determined 
	a minus sign will be placed in this field)
"user_agent"
	The software the client claims to be using. (If it
	could not be determined a minus sign will be placed in
	this field)
	</pre></div>
	
	<p>This affects the access logs written by mod_log and mod_disk_log.
	</p>
	
      </dd>      

      <a name="prop_elog_format"></a>
      <dt><strong>{error_log_format, pretty | compact}</strong></dt>
      <dd>
	<p>Defaults to pretty.  If the error log is meant to be read
	directly by a human <span class="code">pretty</span> will be the best
	option. <span class="code">pretty</span> has the format corresponding to:
	</p>
	
	<div class="example"><pre>io:format("[~s] ~s, reason: ~n ~p ~n~n", [Date, Msg, Reason]).
	</pre></div>

	<p><span class="code">compact</span> has the format corresponding to:</p>
	
	<div class="example"><pre>io:format("[~s] ~s, reason: ~w ~n", [Date, Msg, Reason]).
	</pre></div>

	<p>This affects the error logs written by mod_log and mod_disk_log.
	</p>
      </dd>
      
    </dl>
    
    <a name="props_ssl"></a>
    <p><strong>ssl properties</strong></p>
    <dl>
      <a name="prop_ssl_ca_cert_file"></a>
      <dt><strong>{ssl_ca_certificate_file, path()}</strong></dt>
      <dd> 
	<p>Used as cacertfile option in ssl:listen/2 see
	<span class="bold_code"><a href="javascript:erlhref('../../../../doc/../','ssl','ssl.html');">ssl(3)</a></span>. </p> 
      </dd>
      
      <a name="prop_ssl_cert_file"></a>
      <dt><strong>{ssl_certificate_file, path()}</strong></dt>
      <dd> 
	<p>Used as certfile option in ssl:listen/2 see
	<span class="bold_code"><a href="javascript:erlhref('../../../../doc/../','ssl','ssl.html');">ssl(3)</a></span>. </p> 
      </dd>
      
      <a name="prop_ssl_ciphers"></a>
      <dt><strong>{ssl_ciphers, list()}</strong></dt>
      <dd>
	<p>Used as ciphers option in ssl:listen/2 see
	<span class="bold_code"><a href="javascript:erlhref('../../../../doc/../','ssl','ssl.html');">ssl(3)</a></span>. </p>
      </dd>
      
      <a name="prop_ssl_verify_client"></a>
      <dt><strong>{ssl_verify_client, integer()}</strong></dt>
      <dd>
	<p>Used as verify option in ssl:listen/2 see
	<span class="bold_code"><a href="javascript:erlhref('../../../../doc/../','ssl','ssl.html');">ssl(3)</a></span>. </p>
      </dd>

      <a name="prop_ssl_verify_depth"></a>
      <dt><strong>{ssl_verify_depth, integer()}</strong></dt>
      <dd> 
	<p>Used as depth option in ssl:listen/2 see
	<span class="bold_code"><a href="javascript:erlhref('../../../../doc/../','ssl','ssl.html');">ssl(3)</a></span>. </p>
      </dd>
      
      <a name="prop_ssl_passwd_callback_funct"></a>
      <dt><strong>{ssl_password_callback_function, atom()}</strong></dt>
      <dd> 
	<p>Used together with ssl_password_callback_module
	to retrieve a value to use as password option to ssl:listen/2 
	see <span class="bold_code"><a href="javascript:erlhref('../../../../doc/../','ssl','ssl.html');">ssl(3)</a></span>. </p>
      </dd>

      <a name="prop_ssl_passwd_callback_args"></a>
      <dt><strong>{ssl_password_callback_arguments, list()}</strong></dt>
      <dd> 
	<p>Used together with ssl_password_callback_function to supply a
	list of arguments to the callback function. If not specified
        the callback function will be assumed to have arity 0. </p>
      </dd>
      
      <a name="prop_ssl_passwd_callback_mod"></a>
      <dt><strong>{ssl_password_callback_module, atom()}</strong></dt>
      <dd> 
	<p>Used together with ssl_password_callback_function
	to retrieve a value to use as password option to ssl:listen/2 
	see <span class="bold_code"><a href="javascript:erlhref('../../../../doc/../','ssl','ssl.html');">ssl(3)</a></span>. </p>
      </dd>

    </dl>
    
    <a name="props_alias"></a>
    <p><strong>URL aliasing properties - requires mod_alias</strong></p>
    <dl>
      <a name="prop_alias"></a>
      <dt><strong>{alias, {Alias, RealName}}</strong></dt>
      <dd>
	<p>Where Alias = string() and RealName = string(). 
	The Alias property allows documents to be stored in the local file
	system instead of the document_root location. URLs with a path that
	begins with url-path is mapped to local files that begins with
	directory-filename, for example:
	
	<div class="example"><pre>{alias, {"/image", "/ftp/pub/image"}</pre></div>
	
	and an access to http://your.server.org/image/foo.gif would refer to
	the file /ftp/pub/image/foo.gif. </p>
      </dd>

      <a name="prop_re_write"></a>
      <dt><strong>{re_write, {Re, Replacement}}</strong></dt>      
      <dd>
	<p>Where Re = string() and Replacement = string(). 
	The ReWrite property allows documents to be stored in the local file
	system instead of the document_root location. URLs are rewritten
        by re:replace/3 to produce a path in the local filesystem.
        For example:
	
	<div class="example"><pre>{re_write, {"^/[~]([^/]+)(.*)$", "/home/\\1/public\\2"}</pre></div>
	
	and an access to http://your.server.org/~bob/foo.gif would refer to
	the file /home/bob/public/foo.gif.

        In an Apache like configuration file the Re is separated
        from Replacement with one single space, and as expected
        backslashes do not need to be backslash escaped so the
        same example would become:

        <div class="example"><pre>ReWrite ^/[~]([^/]+)(.*)$ /home/\1/public\2</pre></div>

        Beware of trailing space in Replacement that will be used.
        If you must have a space in Re use e.g the character encoding
        <div class="example"><pre>\040</pre></div> see <span class="bold_code"><a href="javascript:erlhref('../../../../doc/../','stdlib','re.html');">re(3)</a></span>. </p>
      </dd>

      <a name="prop_dir_idx"></a>
      <dt><strong>{directory_index, [string()]}</strong></dt>      
      <dd> 
	<p>DirectoryIndex specifies a list of resources to look for
	if a client requests a directory using a / at the end of the
	directory name. file depicts the name of a file in the
	directory. Several files may be given, in which case the server
	will return the first it finds, for example:
	
	<div class="example"><pre>{directory_index, ["index.hml", "welcome.html"]}</pre></div>
	
	and access to http://your.server.org/docs/ would return
	http://your.server.org/docs/index.html or
	http://your.server.org/docs/welcome.html if index.html do not
	exist. </p>
      </dd> 
    </dl>

    <a name="props_cgi"></a>
    <p><strong>CGI properties - requires mod_cgi</strong></p>
    <dl> 
      <a name="prop_script_alias"></a>
      <dt><strong>{script_alias, {Alias, RealName}}</strong></dt>
      <dd>
	<p>Where Alias = string() and RealName = string().
	Has the same behavior as the Alias property, except that
	it also marks the target directory as containing CGI
	scripts. URLs with a path beginning with url-path are mapped to
	scripts beginning with directory-filename, for example:
	
	<div class="example"><pre>{script_alias, {"/cgi-bin/", "/web/cgi-bin/"}</pre></div>
	
	and an access to http://your.server.org/cgi-bin/foo would cause
	the server to run the script /web/cgi-bin/foo. </p>
      </dd>
      
      <a name="prop_script_re_write"></a>
      <dt><strong>{script_re_write, {Re, Replacement}}</strong></dt>
      <dd>
	<p>Where Re = string() and Replacement = string().
	Has the same behavior as the ReWrite property, except that
	it also marks the target directory as containing CGI
	scripts. URLs with a path beginning with url-path are mapped to
	scripts beginning with directory-filename, for example:
	
	<div class="example"><pre>{script_re_write, {"^/cgi-bin/(\\d+)/", "/web/\\1/cgi-bin/"}</pre></div>
	
	and an access to http://your.server.org/cgi-bin/17/foo would cause
	the server to run the script /web/17/cgi-bin/foo. </p>
      </dd>
      
      <a name="prop_script_nocache"></a>
      <dt><strong>{script_nocache, boolean()}</strong></dt>
      <dd> 
	<p>If ScriptNoCache is set to true the HTTP server will by
	default add the header fields necessary to prevent proxies from
	caching the page. Generally this is something you want. Defaults
	to false. </p>
      </dd>
      
      <a name="prop_script_timeout"></a>
      <dt><strong>{script_timeout, integer()}</strong></dt>
      <dd>
	<p>The time in seconds the web server will wait between each
	chunk of data from the script. If the CGI-script not delivers
	any data before the timeout the connection to the client will be
	closed. Defaults to 15. </p>
      </dd>
      
      <a name="prop_action"></a>
      <dt><strong>{action, {MimeType, CgiScript}} - requires mod_action</strong></dt>
      <dd>
	<p>Where MimeType = string() and CgiScript = string().
	Action adds an action, which will activate a cgi-script
	whenever a file of a certain mime-type is requested. It
	propagates the URL and file path of the requested document using
	the standard CGI PATH_INFO and PATH_TRANSLATED environment
	variables.

	<div class="example"><pre>{action, {"text/plain", "/cgi-bin/log_and_deliver_text"}</pre></div>
	</p>
      </dd>

      <a name="prop_script"></a>
      <dt><strong>{script, {Method, CgiScript}} - requires mod_action</strong></dt>
      <dd>
	<p>Where Method = string() and CgiScript = string().
	Script adds an action, which will activate a cgi-script
	whenever a file is requested using a certain HTTP method. The
	method is either GET or POST as defined in RFC 1945. It
	propagates the URL and file path of the requested document using
	the standard CGI PATH_INFO and PATH_TRANSLATED environment
	variables.
	
	<div class="example"><pre>{script, {"PUT", "/cgi-bin/put"}</pre></div>
	</p>
	
      </dd>
    </dl>
    
    <a name="props_esi"></a>
    <p><strong>ESI properties - requires mod_esi</strong></p>
    <dl>
      <a name="prop_esi_alias"></a>
      <dt><strong>{erl_script_alias, {URLPath, [AllowedModule]}}</strong></dt>      
      <dd>
	<p>Where URLPath = string() and AllowedModule = atom().
	erl_script_alias marks all URLs matching url-path as erl
	scheme scripts. A matching URL is mapped into a specific module
	and function. For example:
	
	<div class="example"><pre>{erl_script_alias, {"/cgi-bin/example", [httpd_example]}
	</pre></div>
	
	and a request to
	http://your.server.org/cgi-bin/example/httpd_example:yahoo
	would refer to httpd_example:yahoo/3 or, if that did not exist,
	httpd_example:yahoo/2 and
	http://your.server.org/cgi-bin/example/other:yahoo would
	not be allowed to execute. </p>
      </dd>

      <a name="prop_esi_nocache"></a>
      <dt><strong>{erl_script_nocache, boolean()}</strong></dt>
      <dd>
	<p>If erl_script_nocache is set to true the server will add
	http header fields that prevents proxies from caching the
	page. This is generally a good idea for dynamic content, since
	the content often vary between each request. 
	Defaults to false. </p>
      </dd>

      <a name="prop_esi_timeout"></a>
      <dt><strong>{erl_script_timeout, integer()}</strong></dt>
      <dd>
	<p>If erl_script_timeout sets the time in seconds the server will
	wait between each chunk of data to be delivered through
	mod_esi:deliver/2. Defaults to 15. This is only relevant
	for scripts that uses the erl scheme. </p>
      </dd>

      <a name="prop_esi_timeout"></a>
      <dt><strong>{eval_script_alias, {URLPath, [AllowedModule]}}</strong></dt>
      <dd>
	<p>Where URLPath = string() and AllowedModule = atom().
	Same as erl_script_alias but for scripts
	using the eval scheme. Note that this is only supported
	for backwards compatibility. The eval scheme is deprecated. </p>
      </dd>
    </dl>

    <a name="props_log"></a>
    <p><strong>Log properties - requires mod_log</strong></p>
    <dl>
      <a name="prop_elog"></a>
      <dt><strong>{error_log, path()}</strong></dt>
      <dd>
	<p>Defines the filename of the error log file to be used to log
	server errors. If the filename does not begin with a slash (/)
	it is assumed to be relative to the server_root. </p>
      </dd>

      <a name="prop_slog"></a>
      <dt><strong>{security_log, path()}</strong></dt>
      <dd>
	<p>Defines the filename of the access log file to be used to
	log security events. If the filename does not begin with a slash
	(/) it is assumed to be relative to the server_root. </p>
      </dd>

      <a name="prop_tlog"></a>
      <dt><strong>{transfer_log, path()}</strong></dt>
      <dd> 
	<p>Defines the filename of the access log file to be used to
	log incoming requests. If the filename does not begin with a
	slash (/) it is assumed to be relative to the server_root. </p>
      </dd>
    </dl>

    <a name="props_dlog"></a>
    <p><strong>Disk Log properties - requires mod_disk_log</strong></p>
    <dl>
      <a name="prop_dlog_format"></a>
      <dt><strong>{disk_log_format, internal | external}</strong></dt>
      <dd>
	<p>Defines the file-format of the log files see disk_log for
	more information. If the internal file-format is used, the
	logfile will be repaired after a crash. When a log file is
	repaired data might get lost. When the external file-format is
	used httpd will not start if the log file is broken. Defaults to
	external. </p>
      </dd>

      <a name="prop_edlog"></a>
      <dt><strong>{error_disk_log, internal | external}</strong></dt>
      <dd>
	<p>Defines the filename of the (disk_log(3)) error log file
	to be used to log server errors. If the filename does not begin
	with a slash (/) it is assumed to be relative to the server_root. </p>
      </dd>

      <a name="prop_edlog_size"></a>
      <dt><strong>{error_disk_log_size, {MaxBytes, MaxFiles}}</strong></dt>
      <dd>
	<p>Where MaxBytes = integer() and MaxFiles = integer().
	Defines the properties of the (disk_log(3)) error log
	file. The disk_log(3) error log file is of type wrap log and
	max-bytes will be written to each file and max-files will be
	used before the first file is truncated and reused. </p>
      </dd>

      <a name="prop_sdlog"></a>
      <dt><strong>{security_disk_log, path()}</strong></dt>
      <dd>
	<p>Defines the filename of the (disk_log(3)) access log file
	which logs incoming security events i.e authenticated
	requests. If the filename does not begin with a slash (/) it
	is assumed to be relative to the server_root. </p>
      </dd>

      <a name="prop_sdlog_size"></a>
      <dt><strong>{security_disk_log_size, {MaxBytes, MaxFiles}}</strong></dt>
      <dd>
	<p>Where MaxBytes = integer() and MaxFiles = integer(). 
	Defines the properties of the disk_log(3) access log
	file. The disk_log(3) access log file is of type wrap log and
	max-bytes will be written to each file and max-files will be
	used before the first file is truncated and reused. </p>
      </dd>

      <a name="prop_tdlog"></a>
      <dt><strong>{transfer_disk_log, path()}</strong></dt> 
      <dd>
	<p>Defines the filename of the (disk_log(3)) access log file
	which logs incoming requests. If the filename does not begin
	with a slash (/) it is assumed to be relative to the
	server_root. </p>
      </dd>
      
      <a name="prop_tdlog_size"></a>
      <dt><strong>{transfer_disk_log_size, {MaxBytes, MaxFiles}}</strong></dt>
      <dd>
	<p>Where MaxBytes = integer() and MaxFiles = integer().  
	Defines the properties of the disk_log(3) access log
	file. The disk_log(3) access log file is of type wrap log and
	max-bytes will be written to each file and max-files will be
	used before the first file is truncated and reused. </p>
      </dd>
    </dl>

    <a name="props_auth"></a>
    <p><strong>Authentication properties - requires mod_auth</strong></p>

    <a name="prop_dri"></a>
    <p><strong>{directory, {path(), [{property(), term()}]}}</strong></p>

    <a name="props_dir"></a>
    <p>Here follows the valid properties for directories </p>
    
    <dl>
      <a name="prop_allow_from"></a>
      <dt><strong>{allow_from,  all | [RegxpHostString]}</strong></dt>
      <dd>
	<p>Defines a set of hosts which should be granted access to a
	given directory.
	
	For example:
	
	<div class="example"><pre>{allow_from, ["123.34.56.11", "150.100.23"] </pre></div>
          
	The host 123.34.56.11 and all machines on the 150.100.23
	subnet are allowed access. </p>
      </dd>
      
      <a name="prop_deny_from"></a>
      <dt><strong>{deny_from,  all | [RegxpHostString]}</strong></dt>
      <dd>
	<p>Defines a set of hosts
	which should be denied access to a given directory.
	For example:
	
	<div class="example"><pre>{deny_from, ["123.34.56.11", "150.100.23"] </pre></div>
          
	The host 123.34.56.11 and all machines on the 150.100.23
	subnet are not allowed access. </p>
      </dd>

      <a name="prop_auth_type"></a>
      <dt><strong>{auth_type,  plain | dets | mnesia}</strong></dt>
      <dd>
	<p>Sets the type of authentication database that is used for the
	directory.The key difference between the different methods is
	that dynamic data can be saved when Mnesia and Dets is used.
	This property is called AuthDbType in the Apache like
	configuration files. </p>
      </dd>

      <a name="prop_auth_user_file"></a>
      <dt><strong>{auth_user_file, path()}</strong></dt>
      <dd>
	<p>Sets the name of a file which contains the list of users and
	passwords for user authentication. filename can be either
	absolute or relative to the <span class="code">server_root</span>. If using the
	plain storage method, this file is a plain text file, where
	each line contains a user name followed by a colon, followed
	by the non-encrypted password. If user names are duplicated,
	the behavior is undefined. For example:
	
	<div class="example"><pre> ragnar:s7Xxv7
 edward:wwjau8 </pre></div> 

	If using the dets storage method, the user database is
	maintained by dets and should not be edited by hand. Use the
	API functions in mod_auth module to create / edit the user
	database.  This directive is ignored if using the mnesia
	storage method.  For security reasons, make sure that the
	<span class="code">auth_user_file</span> is stored outside the document tree of the Web
	server. If it is placed in the directory which it protects,
	clients will be able to download it. </p>
      </dd>
      
      <a name="prop_auth_group_file"></a>
      <dt><strong>{auth_group_file, path()}</strong></dt>
      <dd>
	<p>Sets the name of a file which contains the list of user
	groups for user authentication. Filename can be either
	absolute or relative to the <span class="code">server_root</span>.  If you use the plain
	storage method, the group file is a plain text file, where
	each line contains a group name followed by a colon, followed
	by the member user names separated by spaces. For example:
	
	<div class="example"><pre>group1: bob joe ante</pre></div>
          
	If using the dets storage method, the group database is
	maintained by dets and should not be edited by hand. Use the
	API for mod_auth module to create / edit the group database.
	This directive is ignored if using the mnesia storage method.
	For security reasons, make sure that the <span class="code">auth_group_file</span> is
	stored outside the document tree of the Web server. If it is
	placed in the directory which it protects, clients will be
	able to download it. </p>
      </dd>

      <a name="prop_auth_name"></a>
      <dt><strong>{auth_name, string()}</strong></dt>
      <dd> 
	<p>Sets the name of the authorization realm (auth-domain) for
	a directory. This string informs the client about which user
	name and password to use. </p>
      </dd>

      <a name="prop_auth_access_passwd"></a>
      <dt><strong>{auth_access_password, string()}</strong></dt>
      <dd>
	<p>If set to other than "NoPassword" the password is required
	for all API calls. If the password is set to "DummyPassword" the
	password must be changed before any other API calls. To secure
	the authenticating data the password must be changed after the
	web server is started since it otherwise is written in clear
	text in the configuration file. </p>
      </dd>
      
      <a name="prop_req_user"></a>
      <dt><strong>{require_user, [string()]}</strong></dt>
      <dd> 
	<p>Defines users which should be granted access to a given
	directory using a secret password. </p>
      </dd>

      <a name="prop_req_grp"></a>
      <dt><strong>{require_group, [string()]}</strong></dt>
      <dd>
	<p>Defines users which should be granted access to a given
	directory using a secret password. </p>
      </dd>
      
    </dl>

    <a name="props_htaccess"></a> 
    <p><strong>Htaccess authentication properties - requires mod_htaccess</strong></p>
    <dl>
      <a name="prop_access_files"></a>
      <dt><strong>{access_files, [path()]}</strong></dt>
      <dd>
	<p>Specify which filenames that are used for
	access-files. When a request comes every directory in the path
	to the requested asset will be searched after files with the
	names specified by this parameter. If such a file is found the
	file will be parsed and the restrictions specified in it will
	be applied to the request. </p>
      </dd>
    </dl>

    <a name="props_sec"></a>
    <p><strong>Security properties - requires mod_security </strong></p>
 
    <a name="prop_sec_dir"></a>
    <p><strong>{security_directory, {path(), [{property(), term()}]}</strong></p>
       
    <a name="props_sdir"></a>
    <p>Here follows the valid properties for security directories</p>
    <dl>
      <a name="prop_data_file"></a>
      <dt><strong>{data_file, path()}</strong></dt>      
      <dd>
	<p>Name of the security data file.  The filename can either
	absolute or relative to the server_root. This file is used to
	store persistent data for the mod_security module. </p>
      </dd>
	  
      <a name="prop_max_retries"></a>
      <dt><strong>{max_retries, integer()}</strong></dt>	  
      <dd>
	<p>Specifies the maximum number of tries to authenticate a
	user has before the user is blocked out. If a user
	successfully authenticates when the user has been blocked, the
	user will receive a 403 (Forbidden) response from the
	server. If the user makes a failed attempt while blocked the
	server will return 401 (Unauthorized), for security
	reasons. 
	Defaults to 3 may also be set to infinity. </p>
      </dd>
	
      <a name="prop_block_time"></a>
      <dt><strong>{block_time, integer()}</strong></dt>
      <dd>
	<p>Specifies the number of minutes a user is blocked. After
	this amount of time, he automatically regains access.
	Defaults to 60. </p>
      </dd>
      
      <a name="prop_fail_exp_time"></a>
      <dt><strong>{fail_expire_time, integer()}</strong></dt>
      <dd>
	<p>Specifies the number of minutes a failed user authentication
	is remembered. If a user authenticates after this amount of
	time, his previous failed authentications are
	forgotten. 
	Defaults to 30. </p>
      </dd>
      
      <a name="prop_auth_timeout"></a>
      <dt><strong>{auth_timeout, integer()}</strong></dt>
      <dd>
	Specifies the number of seconds a successful user
	authentication is remembered. After this time has passed, the
	authentication will no longer be reported. Defaults to 30.
      </dd>
    </dl>    
  </div>

  <h3>EXPORTS</h3>
    <p><a name="info-1"><span class="bold_code">info(Pid) -&gt;</span></a><br><a name="info-2"><span class="bold_code">info(Pid, Properties) -&gt; [{Option, Value}]</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">Properties = [property()]</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Option =  property()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Value = term()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
        <p>Fetches information about the HTTP server. When called
	with only the pid all properties are fetched, when called
	with a list of specific properties they are fetched.
	Available properties are the same as the servers start options. 
	</p>
	
	<div class="note">
<div class="label">Note</div>
<div class="content"><p><p>Pid is the pid returned from inets:start/[2,3]. 
	    Can also be retrieved form inets:services/0, inets:services_info/0
	    see <span class="bold_code"><a href="inets.html">inets(3)</a></span>
	  </p></p></div>
</div>
      </p></div>

    <p><a name="info-2"><span class="bold_code">info(Address, Port) -&gt;  </span></a><br><a name="info-3"><span class="bold_code">info(Address, Port, Properties) -&gt; [{Option, Value}] </span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
	<div class="REFTYPES">
<span class="bold_code">Address = ip_address()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Port = integer()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Properties = [property()]</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Option = property()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Value = term()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
        <p>Fetches information about the HTTP server. When called with
	only the Address and Port all properties are fetched, when
	called with a list of specific properties they are fetched.
	Available properties are the same as the servers start
	options.
	</p>

	<div class="note">
<div class="label">Note</div>
<div class="content"><p><p> Address has to be the ip-address and can not be
	    the hostname.
	  </p></p></div>
</div>	
      </p></div>
    
    <p><a name="reload_config-2"><span class="bold_code">reload_config(Config, Mode) -&gt; ok | {error, Reason}</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">Config = path() | [{Option, Value}]</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Option = property()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Value = term()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Mode = non_disturbing | disturbing</span><br>
</div>
      </div>
<div class="REFBODY"><p>
	<p>Reloads the HTTP server configuration without restarting the
	  server. Incoming requests will be answered with a temporary
	  down message during the time the it takes to reload.</p>
	
	<div class="note">
<div class="label">Note</div>
<div class="content"><p><p>Available properties are the same as the servers
	    start options, although the properties bind_address and
	    port can not be changed.</p></p></div>
</div>
	
	<p>If mode is disturbing, the server is blocked forcefully and
	  all ongoing requests are terminated and the reload will
	  start immediately. If mode is non-disturbing, no new
	  connections are accepted, but the ongoing requests are
	  allowed to complete before the reload is done.</p>
      </p></div>
  

  <h3><a name="id84431">ERLANG WEB SERVER API DATA TYPES </a></h3>
<div class="REFBODY">
    
    <div class="example"><pre>
      ModData = #mod{}

      -record(mod, {
		data = [],
		socket_type = ip_comm,
		socket, 
		config_db,
		method,
		absolute_uri,
		request_uri,
		http_version,
		request_line,
		parsed_header = [],
		entity_body,
		connection
	}).
    </pre></div>

    <p>To acess the record in your callback-module use </p>
    <div class="example"><pre> -include_lib("inets/include/httpd.hrl"). </pre></div>

    <p>The fields of the <span class="code">mod</span> record has the following meaning:
      </p>
    <dl>
      <dt><strong><span class="code">data</span></strong></dt>
      <dd>Type <span class="code">[{InteractionKey,InteractionValue}]</span> is used to
       propagate data between modules. Depicted
      <span class="code">interaction_data()</span> in function type declarations.
      </dd>
      <dt><strong><span class="code">socket_type</span></strong></dt>
      <dd>
<span class="code">socket_type()</span>,
       Indicates whether it is an ip  socket or a  ssl socket.
      </dd>
      <dt><strong><span class="code">socket</span></strong></dt>
      <dd>The actual socket in <span class="code">ip_comm</span> or <span class="code">ssl</span> format
       depending on the <span class="code">socket_type</span>.
      </dd>
      <dt><strong><span class="code">config_db</span></strong></dt>
      <dd>The config file directives stored as key-value tuples in
       an ETS-table. Depicted <span class="code">config_db()</span> in function type
       declarations.
      </dd>
      <dt><strong><span class="code">method</span></strong></dt>
      <dd>Type <span class="code">"GET" | "POST" | "HEAD" | "TRACE"</span>, that is the
       HTTP method.
      </dd>
      <dt><strong><span class="code">absolute_uri</span></strong></dt>
      <dd>If the request is a HTTP/1.1
       request the URI might be in the absolute URI format.  In that
       case httpd will save the absolute URI in this field.  An Example
       of an absolute URI could
       be<span class="code">"http://ServerName:Part/cgi-bin/find.pl?person=jocke"</span>
</dd>
      <dt><strong><span class="code">request_uri</span></strong></dt>
      <dd>The <span class="code">Request-URI</span> as defined
       in RFC 1945, for example <span class="code">"/cgi-bin/find.pl?person=jocke"</span>
</dd>
      <dt><strong><span class="code">http_version</span></strong></dt>
      <dd>The <span class="code">HTTP</span> version of the
       request, that is "HTTP/0.9", "HTTP/1.0", or "HTTP/1.1".
      </dd>
      <dt><strong><span class="code">request_line</span></strong></dt>
      <dd>The <span class="code">Request-Line</span> as
       defined in RFC 1945, for example <span class="code">"GET /cgi-bin/find.pl?person=jocke HTTP/1.0"</span>.
      </dd>
      <dt><strong><span class="code">parsed_header</span></strong></dt>
      <dd>Type <span class="code">[{HeaderKey,HeaderValue}]</span>,
      <span class="code">parsed_header</span> contains all HTTP header fields from the
      HTTP-request stored in a list as key-value tuples. See RFC 2616
      for a listing of all header fields. For example the date field
      would be stored as: <span class="code">{"date","Wed, 15 Oct 1997 14:35:17 GMT"} </span>.
      RFC 2616 defines that HTTP is a case insensitive protocol and
      the header fields may be in lower case or upper case. Httpd will
      ensure that all header field names are in lower case.
      </dd>
      <dt><strong><span class="code">entity_body</span></strong></dt>
      <dd>The <span class="code">Entity-Body</span> as defined
       in RFC 2616, for example data sent from a CGI-script using the
       POST method.
      </dd>
      <dt><strong><span class="code">connection</span></strong></dt>
      <dd>
<span class="code">true | false</span> If set to true the connection to the
       client is a persistent connection and will not be closed when
       the request is served.</dd>
    </dl>
  </div>

  <h3><a name="id84648">ERLANG WEB SERVER API CALLBACK FUNCTIONS</a></h3>
<div class="REFBODY">
    
  </div>
  <h3>EXPORTS</h3>
    <p><a name="Module:do-1"><span class="bold_code">Module:do(ModData)-&gt; {proceed, OldData} | {proceed, NewData} | {break, NewData} | done</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">OldData = list()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">NewData = [{response,{StatusCode,Body}}] | [{response,{response,Head,Body}}] |  [{response,{already_sent,Statuscode,Size}] </span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">StausCode = integer()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Body = io_list() | nobody | {Fun, Arg}</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Head = [HeaderOption]</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">HeaderOption = {Option, Value} | {code, StatusCode}</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Option =  accept_ranges | allow | cache_control | content_MD5 | content_encoding | content_language | content_length | content_location | content_range | content_type | date | etag | expires | last_modified | location | pragma | retry_after | server | trailer | transfer_encoding</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Value = string()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Fun = fun( Arg ) -&gt; sent| close | Body </span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Arg = [term()]</span><br>
</div>
      </div>
<div class="REFBODY"><p>
        <p>When a valid request reaches httpd it calls <span class="code">do/1</span> in
          each module defined by the Modules configuration
          option. The function may generate data for other modules
          or a response that can be sent back to the client.</p>
        <p>The field <span class="code">data</span> in ModData is a list. This list will be
          the list returned from the last call to
          <span class="code">do/1</span>.</p>
        <p><span class="code">Body</span> is the body of the http-response that will be
          sent back to the client an appropriate header will be
          appended to the message. <span class="code">StatusCode</span> will be the
          status code of the response see RFC2616 for the appropriate
          values.</p>
        <p><span class="code">Head</span> is a key value list of HTTP header fields. The
          server will construct a HTTP header from this data. See RFC
          2616 for the appropriate value for each header field. If the
          client is a HTTP/1.0 client then the server will filter the
          list so that only HTTP/1.0 header fields will be sent back
          to the client.</p>
        <p>If <span class="code">Body</span> is returned and equal to <span class="code">{Fun,Arg}</span>,
          the Web server will try <span class="code">apply/2</span> on <span class="code">Fun</span> with
          <span class="code">Arg</span> as argument and expect that the fun either
          returns a list <span class="code">(Body)</span> that is a HTTP-repsonse or the
          atom sent if the HTTP-response is sent back to the
          client. If close is returned from the fun something has gone
          wrong and the server will signal this to the client by
          closing the connection.</p>
      </p></div>

    <p><a name="Module:load-2"><span class="bold_code">Module:load(Line, AccIn)-&gt; eof | ok | {ok, AccOut} |  {ok, AccOut, {Option, Value}} | {ok, AccOut, [{Option, Value}]} | {error, Reason}  </span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">Line = string()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">AccIn = [{Option, Value}]</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">AccOut = [{Option, Value}]</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Option = property()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Value = term() </span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
	<p>Load is used to convert a line in a Apache like
	  configuration file to a <span class="code">{Option, Value}</span> tuple.  Some
	  more complex configuration options such as <span class="code">directory</span>
	  and <span class="code">security_directory</span> will create an
	  accumulator.This function does only need clauses for the
	  options implemented by this particular callback module.
	</p>
      </p></div>

    <p><a name="Module:store-2"><span class="bold_code">Module:store({Option, Value}, Config)-&gt; {ok, {Option, NewValue}} | {error, Reason}  </span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">Line = string()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Option = property()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Config = [{Option, Value}]</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Value = term() </span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
	<p>This function is used to check the validity of the
	  configuration options before saving them in the internal
	  database. This function may also have a side effect
	  e.i. setup necessary extra resources implied by the
	  configuration option. It can also
	  resolve possible dependencies among
	  configuration options by changing the value of the option.
	  This function does only need clauses for the options
	  implemented by this particular callback module.</p>
      </p></div>

    <p><a name="Module:remove-1"><span class="bold_code">Module:remove(ConfigDB) -&gt; ok | {error, Reason}  </span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">ConfigDB = ets_table()</span><br>
</div>
        <div class="REFTYPES">
<span class="bold_code">Reason = term()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
        <p>When httpd is shutdown it will try to execute
          <span class="code">remove/1</span> in each Erlang web server callback module. The
          programmer may use this function to clean up resources
          that may have been created in the store function.</p>
      </p></div>
  

  <h3><a name="id84952">ERLANG WEB SERVER API HELP FUNCTIONS</a></h3>
<div class="REFBODY">
    
  </div>
  <h3>EXPORTS</h3>
    <p><a name="parse_query-1"><span class="bold_code">parse_query(QueryString) -&gt;  [{Key,Value}]</span></a><br></p>
<div class="REFBODY">
<p>Types:</p>
        <div class="REFTYPES">
<span class="bold_code">QueryString = string()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Key = string()</span><br>
</div>
	<div class="REFTYPES">
<span class="bold_code">Value = string()</span><br>
</div>
      </div>
<div class="REFBODY"><p>
        <p><span class="code">parse_query/1</span> parses incoming data to <span class="code">erl</span> and
          <span class="code">eval</span> scripts (See <span class="bold_code"><a href="mod_esi.html">mod_esi(3)</a></span>) as defined in the standard
          URL format, that is '+' becomes 'space' and decoding of
          hexadecimal characters (<span class="code">%xx</span>).</p>
      </p></div>
  

  <h3><a name="id85030">SEE ALSO</a></h3>
<div class="REFBODY">
    
    <p>RFC 2616, <span class="bold_code"><a href="inets.html">inets(3)</a></span>,
      <span class="bold_code"><a href="javascript:erlhref('../../../../doc/../','ssl','ssl.html');">ssl(3)</a></span>
    </p>
  </div>

</div>
<div class="footer">
<hr>
<p>Copyright © 1997-2012 Ericsson AB. All Rights Reserved.</p>
</div>
</div>
</div></body>
</html>