~cpick/mongrel2/release

« back to all changes in this revision

Viewing changes to examples/ws/mongrel2.conf

  • Committer: Chris Pick
  • Date: 2013-06-30 16:39:57 UTC
  • mfrom: (1106.1.15)
  • Revision ID: git-v1:ec39967acb6bc9867ed9b9dc3774304ca6b9c294
Merge tag 'v1.8.1' into debian

Hotfix for github issue 148

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# here's a sample directory
 
2
test_directory = Dir(base='tests/',
 
3
                     index_file='index.html',
 
4
                     default_ctype='text/plain')
 
5
 
 
6
htchat_dir = Dir(base='htchat/', 
 
7
                    index_file='index.html', 
 
8
                    default_ctype='text/plain')
 
9
 
 
10
# a sample of doing some handlers
 
11
htchat_app = Handler(send_spec='tcp://127.0.0.1:9999',
 
12
                    send_ident='54c6755b-9628-40a4-9a2d-cc82a816345e',
 
13
                    recv_spec='tcp://127.0.0.1:9998', recv_ident='',
 
14
                    protocol='tnetstring')
 
15
 
 
16
handler_test = Handler(send_spec='tcp://127.0.0.1:9990',
 
17
                       send_ident='34f9ceee-cd52-4b7f-b197-88bf2f0ec378',
 
18
                       recv_spec='tcp://127.0.0.1:9989', recv_ident=''
 
19
                       #)
 
20
                       ,protocol='tnetstring')
 
21
 
 
22
# your main host
 
23
mongrel2 = Host(name="ashley-jason.com", routes={
 
24
    '/handlertest': handler_test
 
25
    '/htchat' : htchat_dir
 
26
    '/htchat/app' :htchat_app
 
27
}
 
28
)
 
29
 
 
30
# the server to run them all
 
31
main = Server(
 
32
    uuid="5",
 
33
    access_log="/logs/access.log",
 
34
    error_log="/logs/error.log",
 
35
    chroot="./",
 
36
    pid_file="/run/mongrel2.pid",
 
37
    default_host="ashley-jason.com",
 
38
    matching='(.*)',
 
39
    name="main",
 
40
    port=6767,
 
41
    #bind_addr="127.0.0.1",
 
42
    hosts=[mongrel2]
 
43
)
 
44
 
 
45
 
 
46
 
 
47
settings = {"zeromq.threads": 1,
 
48
            "limits.client_read_retries" : 80,
 
49
            "limits.min_ping" : 0,
 
50
            "limits.min_write_rate":0,
 
51
            "limits.min_read_rate":0}
 
52
 
 
53
servers = [main]
 
54
 
 
55