13
13
compliance with the License. You should have received a copy of the
14
14
Erlang Public License along with this software. If not, it can be
15
15
retrieved online at http://www.erlang.org/.
17
17
Software distributed under the License is distributed on an "AS IS"
18
18
basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
19
19
the License for the specific language governing rights and limitations
24
24
<title>HTTP server </title>
83
83
<p>The server is configured using an erlang property list.
84
84
For the available properties see
85
<seealso marker="inets:inets">httpd(3)</seealso>
85
<seealso marker="httpd">httpd(3)</seealso>
86
86
For backwards compatibility also apache-like config files
246
246
every row contains the name of the group and the members
247
247
of the group separated by a space, for example:</p>
249
\011 GroupName: Member1 Member2 .... MemberN
249
GroupName: Member1 Member2 .... MemberN
299
299
the specified methods. If no request method is specified
300
300
all request methods are verified against the restrictions.</p>
302
\011 <Limit POST GET HEAD>
303
\011 order allow deny
304
\011 require group group1
305
\011 allow from 123.145.244.5
302
<Limit POST GET HEAD>
305
allow from 123.145.244.5
363
363
message-body, separated by a blank line. The message-header
364
364
contains one or more header fields. The body may be
365
365
empty. Example: </p>
367
"Content-Type:text/plain\
371
\011plain text" </code>
367
<code>"Content-Type:text/plain\nAccept-Ranges:none\n\nsome very
372
370
<p>The server will interpret the cgi-headers and most of them
373
371
will be transformed into HTTP headers and sent back to the
374
372
client together with the body.</p>
387
385
the extra overhead. An URL which calls an Erlang erl function
388
386
has the following syntax (regular expression): </p>
389
387
<code type="none">
390
\011 http://your.server.org/***/Module[:/]Function(?QueryString|/PathInfo)
388
http://your.server.org/***/Module[:/]Function(?QueryString|/PathInfo)
392
390
<p>*** above depends on how the ErlScriptAlias config
393
391
directive has been used</p>
428
426
http://your.server.org/eval?httpd_example:print(atom_to_list(apply(erlang,halt,[])))
430
428
<p>which effectively will close down the Erlang node,
431
that is use the erl scheme instead, until this
429
therefor, use the erl scheme instead, until this
432
430
security breach has been fixed.</p>
433
431
<p>Today there are no good way of solving this problem
434
432
and therefore Eval Scheme may be removed in future
498
496
for parsed files, for example:
501
\011text/x-server-parsed-html shtml shtm
499
text/x-server-parsed-html shtml shtm
503
501
<p>This makes files ending with <c>.shtml</c> and <c>.shtm</c>
504
502
into parsed files. Alternatively, if the performance hit is not a
505
503
problem, <em>all</em> HTML pages can be marked as parsed:
508
\011text/x-server-parsed-html html htm
506
text/x-server-parsed-html html htm
518
516
unparsed. Each directive has the following format:
521
\011<!--#command tag1="value1" tag2="value2" -->
519
<!--#command tag1="value1" tag2="value2" -->
523
521
<p>Each command takes different arguments, most only accept one
524
522
tag at a time. Here is a breakdown of the commands and their
753
751
schema and the tables already is created. </p>
756
-module(mnesia_test).
757
-export([start/0,load_data/0]).
758
-include("mod_auth.hrl").
761
mnesia:create_schema([node()]),
763
mnesia:create_table(httpd_user,
764
[{type,bag},{disc_copies,[node()]},
765
{attributes,record_info(fields,httpd_user)}]),
766
mnesia:create_table(httpd_group,
767
[{type,bag},{disc_copies,[node()]},
768
{attributes,record_info(fields,httpd_group)}]),
769
mnesia:wait_for_tables([httpd_user,httpd_group],60000).
773
mnesia:wait_for_tables([httpd_user,httpd_group],60000).
754
-module(mnesia_test).
755
-export([start/0,load_data/0]).
756
-include("mod_auth.hrl").
759
mnesia:create_schema([node()]),
761
mnesia:create_table(httpd_user,
763
{disc_copies, [node()]},
764
{attributes, record_info(fields,
766
mnesia:create_table(httpd_group,
768
{disc_copies, [node()]},
769
{attributes, record_info(fields,
771
mnesia:wait_for_tables([httpd_user, httpd_group], 60000).
775
mnesia:wait_for_tables([httpd_user, httpd_group], 60000).
776
778
<p>To create the Mnesia tables we use two records defined in