~ubuntu-branches/ubuntu/trusty/ocamlnet/trusty

« back to all changes in this revision

Viewing changes to examples/nethttpd/netplex.conf

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu
  • Date: 2011-09-02 14:12:33 UTC
  • mfrom: (18.2.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110902141233-zbj0ygxb92u6gy4z
Tags: 3.4-1
* New upstream release
  - add a new NetcgiRequire directive to ease dependency management
    (Closes: #637147)
  - remove patches that were applied upstream:
    + Added-missing-shebang-lines-in-example-shell-scripts
    + Try-also-ocamlc-for-POSIX-threads

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
(* Configuration file for the "netplex" program. *)
 
2
 
 
3
netplex {
 
4
  controller {
 
5
    max_level = "debug";    (* Log level *)
 
6
    logging {
 
7
      type = "stderr";    (* Log to stderr *)
 
8
    }
 
9
  };
 
10
  service {
 
11
    name = "nethttpd";
 
12
    protocol {
 
13
      (* This section creates the socket *)
 
14
      name = "http";
 
15
      address {
 
16
        type = "internet";
 
17
        bind = "0.0.0.0:4444";
 
18
      };
 
19
(*
 
20
      address {
 
21
        type = "internet";
 
22
        bind = "[::1]:4445";   (* IPv6 example *)
 
23
      }
 
24
 *)
 
25
    };
 
26
    processor {
 
27
      (* This section specifies how to process data of the socket *)
 
28
      type = "nethttpd";
 
29
      access_log = "debug";  (* or "off" or "enabled" *)
 
30
      suppress_broken_pipe = true;
 
31
      host {
 
32
        (* Think of Apache's "virtual hosts" *)
 
33
        pref_name = "localhost";
 
34
        pref_port = 4444;
 
35
        names = "*:0";   (* Which requests are matched here: all *)
 
36
        uri {
 
37
          path = "/";
 
38
          service {
 
39
            type = "file";
 
40
            docroot = "/usr";
 
41
            media_types_file = "/etc/mime.types";
 
42
            enable_listings = true;
 
43
          }
 
44
        };
 
45
        uri {
 
46
          path = "/adder";  (* This path is bound to the adder *)
 
47
          service {
 
48
            type = "dynamic";
 
49
            handler = "adder";
 
50
          }
 
51
        }
 
52
      };
 
53
    };
 
54
    workload_manager {
 
55
      type = "dynamic";
 
56
      max_jobs_per_thread = 1;  (* Everything else is senseless *)
 
57
      min_free_jobs_capacity = 1;
 
58
      max_free_jobs_capacity = 1;
 
59
      max_threads = 20;
 
60
    };
 
61
  }
 
62
}