File: multi_handler.conf

package info (click to toggle)
mongrel2 1.12.0-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 5,976 kB
  • sloc: ansic: 39,083; python: 2,833; sql: 1,555; sh: 467; makefile: 360; asm: 189; yacc: 145; php: 73; awk: 28; sed: 5
file content (52 lines) | stat: -rw-r--r-- 1,243 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

chat_handler = Handler(
    send_spec = "tcp://127.0.0.1:9999",
    send_ident = "rune",
    recv_spec = "tcp://127.0.0.1:9998",
    recv_ident = ""
    )

dev = Server(
    uuid = "dev",
    name = "dev",

    chroot = "./",
    pid_file = "/run/dev.pid",
    access_log = "/logs/dev-access.log",
    error_log = "/logs/dev-error.log",

    default_host = "localhost",
    port = 6767,

    hosts = [
        Host(
            name = "localhost",
            routes={
                "/": chat_handler,
                "/a": chat_handler,
                "/b": chat_handler,
                "/c": chat_handler,
                "/d": chat_handler,
                "@stuff": chat_handler,
                "@chat": chat_handler,

                "/static/": Dir(
                    base = "examples/chat/static/",
                    index_file = "index.html",
                    default_ctype = "text/plain"
                    ),

                "/cache/": Dir(
                    base = "cache/",
                    index_file = "index.html",
                    default_ctype = "text/plain"
                    )
                }
            )
        ]
    )

servers = [dev]
mimetypes = {
    ".ttf": "application/x-font-ttf"
    }